[Locomotive-users] Mongrel doesn't seem to start

Greg Hauptmann greg.hauptmann.ruby at gmail.com
Tue May 22 09:34:34 GMT 2007


Hi Liehann,

Starting the server via "ruby script/server" is exactly what I've been doing
since I haven't had Locomotive working for this.

Re how to fix boot.rb that would be great if you could post some detail of
what to do here.  I couldn't quite follow your last post sorry.

Cheers
Greg

On 5/22/07, Liehann Loots <liehann at iafrica.com> wrote:
>
>  I'll try to explain. If I go over stuff you already know, my apologies.
> Also I'm new to the mac so some of my terminology may be a bit pc.
>
>
>
> So when you click on the start button in locomotive a script is run that
> launches a web server. By default the web server used is mongrel. You could
> also use lighttp (supported by locomotive), apache or any number of other
> webservers.
>
>
>
> If the script executed successfully the server would start on the port
> shown in locomotive, 3000 by default. So when the browser connects to
> localhost (your machine) on port 3000 it would connect to the web server
> started by locomotive. But because there is a bug / compatibility issue in
> the script that starts the webserver, the script fails before the webserver
> is started.
>
>
>
> So Firefox tries to connect to port 3000 but nothing is listening on that
> port. Firefox then displays the "Firefox can't connect …" error. You mention
> that when you "View Source" in Firefox the source is actually from the page
> you were expecting. That does sound a little weird, but I suspect what is
> actually going on is Firefox is generating html, but makes it look like it
> is from the site you requested, so if you hit the refresh button it will try
> to reload the page served by your webserver, as opposed to reloading the
> "Firefox can't connect …" page.
>
>
>
> So something else you could try, which bypasses locomotive, and should at
> least get you started, is to manually start the web server.
>
> Use locomotive to open a command prompt window (I think the option may be
> called terminal window, or console). You can get to the option by
> right-clicking on your project in the locomotive list control. The terminal
> should open in your project's directory. (Something else to check, is that
> locomotive is calling the generate scripts correctly. I started off with an
> incompatible bundle, I'm on mac os X 10.3 and had to download the January
> bundle). At the prompt type: scripts/server
>
> This should start the web server (if I have the folder and script name
> wrong, you can use Finder to check). The server is started on port 3000. If
> there are error messages you will at least have a concrete issue J,
> otherwise the server should start ok. If you go back to Firefox and refresh
> the page you should see your website.
>
> Hit ctrl-c (probably apple-c on the mac) in the terminal to stop the
> server.
>
>
>
> If that works it shows that your setup is pretty much working. I would
> then recommend you look for and fix boot.rb as mentioned in the earlier
> post, which should allow you to use locomotive, which is far more convenient
> that dropping down to the command prompt.
>
>
>
> Good luck. If you have problems with the last step – fixing boot.rb, I'll
> fire up my mac and give you a detailed explanation of where to look, what to
> run etc. which will hopefully get you sorted out.
>
>
>
> Regards,
>
> Liehann
>
>
>  ------------------------------
>
> *From:* locomotive-users-bounces at lists.raaum.org [mailto:
> locomotive-users-bounces at lists.raaum.org] *On Behalf Of *Greg Hauptmann
> *Sent:* 21 May 2007 12:34 PM
> *To:* locomotive-users at lists.raaum.org
> *Subject:* Re: [Locomotive-users] Mongrel doesn't seem to start
>
>
>
> I still can't quite see how to apply this to my situation whereby when I
> try to start the application (mongrel) that (a) from the Locomotive
> application it seems as if it starts but (b) when trying to connect to the
> application via a web browser I get an "Firefox can't establish a connection
> to the server at localhost:3000.".
>
> *Update*: When I get this error message (i.e. "Firefox can't establish
> ...") if I do a View Source, the source is actually from the page that I'm
> expecting.  So is as if it got the HTML ok back to the browser but for some
> reason Firefox is not displaying it correctly.  The same problem does exist
> in Safari as well.
>
> Any ideas?
>
>  On 5/21/07, *Lori M Olson* <loriolson at mac.com> wrote:
>
> boot.rb
>
> Good catch.
>
> Regards, Lori
>
> On 20-May-07, at 10:35 AM, Liehann Loots wrote:
>
> > Finally got some time to look into this. The problem seems to be a
> > gem version incompatibility issue. I forget the file, but there is
> > a require_gem line that should just be gem.
> >
> >
> >
> > I found it by manually running the start command, which led to the
> > start_mongrel command (in the locomotive bin directory). That
> > displayed the error on the console. From there I just edited the
> > appropriate file which had the error.
> >
> >
> >
> > Apologies for not naming the exact file but I'm not on the mac
> > right now and I can't remember the name L
> >
> >
> >
> > Regards,
> >
> > Liehann
> >
> >
> >
> > From: locomotive-users-bounces at lists.raaum.org [mailto: locomotive-
> > users-bounces at lists.raaum.org] On Behalf Of Greg Hauptmann
> > Sent: 16 May 2007 10:00 PM
> > To: locomotive-users at lists.raaum.org
> > Subject: Re: [Locomotive-users] Mongrel doesn't seem to start
> >
> >
> >
> > (bump - would be still very interested if someone had any
> > suggestions here)
> >
> > On 5/12/07, Greg Hauptmann < greg.hauptmann.ruby at gmail.com> wrote:
> >
> > Hi all,
> >
> > I'm having the same problem as Liehann.  When launching the
> > application from Locomotive I get the "Unable to connect" when
> > trying to connect to it, but when I "ruby script/server" it seems
> > to work fine.
> >
> > I tried opening Console and noted I got this after (a) starting up
> > the app (b) trying to connect - unsuccessfully and then (c)
> > stopping the app:
> >
> > Starting mongrel on http://localhost:3003 in development mode
> > pid:
> >
> > /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/
> > bin/terminate:168:in `get_pid': Could not find pid file: /Users/
> > greg/source/topdonator/log/locomotive.pid
> > (TerminateApp::PidFileMissingError)
> >     from /Applications/Locomotive2/Bundles/
> > standardRailsMar2007.locobundle/bin/terminate:117:in `initialize'
> >     from /Applications/Locomotive2/Bundles/
> > standardRailsMar2007.locobundle /bin/terminate:188:in `new'
> >     from /Applications/Locomotive2/Bundles/
> > standardRailsMar2007.locobundle/bin/terminate:188
> >
> >
> > Note - I'm using the "Standard Rails March 2007" bundle (although
> > the problem occurred prior to this too).  It's probably true to say
> > that I may have updated my Mac version of Rails/Ruby, but I think
> > the ways Locomotive works is that it has it's own copies bundled
> > no?  Also in my application I have "frozen" rails, so it is in the
> > vendor directory (not sure if this is significant).  Also I note if
> > I create a NEW application in Locomotive via it's create feature,
> > that I can run this OK.
> >
> > Any ideas on how to find out what is happening "under-the-bonnet"
> > when using Locomotive to start the application?
> >
> > Thanks
> > Greg
> >
> >
> >
> >
> > On 5/10/07, Alex Satrapa < grail at goldweb.com.au> wrote:
> >
> > On 10/05/2007, at 16:32 , Liehann Loots wrote:
> >
> > > Where do I find Console.app?
> >
> > Console.app should be found at /Applications/Utilities/Console.app
> > (remember to ask Spotlight, too!)
> >
> > The icon represents a orange phosphor CRT screen, if that helps
> > locate it quickly.
> >
> > Alex
> >
> > _______________________________________________
> > Locomotive-users mailing list
> > Locomotive-users at lists.raaum.org
> > http://lists.raaum.org/mailman/listinfo/locomotive-users
> >
> >
> >
> >
> >
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.467 / Virus Database: 269.7.1/807 - Release Date:
> > 16/05/2007 06:05 PM
> >
> >
> > No virus found in this outgoing message.
> > Checked by AVG Free Edition.
> > Version: 7.5.467 / Virus Database: 269.7.6/813 - Release Date:
> > 20/05/2007 07:54 AM
> >
> > _______________________________________________
> > Locomotive-users mailing list
> > Locomotive-users at lists.raaum.org
> > http://lists.raaum.org/mailman/listinfo/locomotive-users
>
> _______________________________________________
> Locomotive-users mailing list
> Locomotive-users at lists.raaum.org
> http://lists.raaum.org/mailman/listinfo/locomotive-users
>
>
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.467 / Virus Database: 269.7.6/814 - Release Date: 21/05/2007
> 02:01 PM
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.467 / Virus Database: 269.7.6/814 - Release Date: 21/05/2007
> 02:01 PM
>
> _______________________________________________
> Locomotive-users mailing list
> Locomotive-users at lists.raaum.org
> http://lists.raaum.org/mailman/listinfo/locomotive-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://one.textdrive.com/pipermail/locomotive-users/attachments/20070522/85f18788/attachment-0001.htm


More information about the Locomotive-users mailing list