[Mongrel] Newbie confusion.

Jason Edwards j.edwards at itransact.com
Sun Sep 23 15:20:48 EDT 2007


TW,

Welcome to the Linux and Ruby world -- it's a wonderful place :-)

The most likely explanation for this is, 'mongrel_rails' wasn't found  
in your path.  'mongrel_rails' is sometimes installed in '/usr/local/ 
bin' which some distros don't include by default.

Next time you run into a situation where a command is not found, try:

user at host:~$ locate <command-name>  # e.g. locate mongrel_rails
-- or --
user at host:~$ find / -name <command-name>  # e.g. find / -name  
mongrel_rails

Which results in something like:

/usr/local/bin/mongrel_rails
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails

Now check your path like this:

user at host:~$ echo $PATH
/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin

In this case, 'mongrel_rails' would not be found, so I would need to  
add '/usr/local/bin' to the $PATH environment variable, like so:

user at host:~$ export PATH=$PATH:/usr/local/bin

Hope this helps,

Jason


On Sep 23, 2007, at 10:19 AM, TW Scannell wrote:

> Hello,
>
> I am new to Rails and the Linux world coming from 12 years of  
> advanced VB programming. I am writing to try and clear up some  
> confusion on my part about installing Mongrel.
>
> Please don't take this as a rant, I do appreciate the effort that  
> y'all put into the community, but as a newbie, I was, and still am  
> confused.
> I want to learn about Mongrel, so it found http:// 
> mongrel.rubyforge.org/docs/started.html and followed the simple  
> instructions:
>
> $ sudo gem install mongrel
> $ cd myrailsapp
> $ mongrel_rails start -d
> Which runs Mongrel in the background. You can stop it with:
>
> $ mongrel_rails stop
>
> What I found was far more than that, and to be honest, I have no  
> idea whether or not I installed correctly.
> When I ran sudo gem install mongrel, I was presented with a series  
> of options that I had no idea of how to respond.
>
> Install required dependency daemons? [Yn]  y
> Install required dependency fastthread? [Yn]  y
> Install required dependency gem_plugin? [Yn]  y
> Install required dependency cgi_multipart_eof_fix? [Yn]  y
>
> After the install, the command "mongrel_rails start -d" was not  
> recognized
>
> $ mongrel_rails start -d
> bash: mongrel_rails: command not found
>
> soo...
> I gave up and did what I had been doing, which is script/server.
> Lo-and-behold, mongrel starts up... ???
>
>
> $ script/server
> => Booting Mongrel (use 'script/server webrick' to force WEBrick)
>
> => Rails application starting on http://0.0.0.0:3000
>
> => Call with -d to detach
> => Ctrl-C to shutdown server
>
> ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix
> ** Starting Mongrel listening at
> 0.0.0.0:3000
> ** Starting Rails with development environment...
>
> ** Rails loaded.
> ** Loading any Rails specific GemPlugins
>
> ** Signals ready.  TERM => stop.  USR2 => restart.  INT => stop (no  
> restart).
> ** Rails signals registered.  HUP => reload (without restart).  It  
> might not work well.
>
> ** Mongrel available at 0.0.0.0:3000
>
> ** Use CTRL-C to stop.
>
> I guess that that the correct cmd would be "script/server -d ???
>
> OK, it's not the end of the world, but it sure threw me for a loop.
>
> Like I said, I appreciate all that you do, but maybe some of this  
> could be put into the "Getting Started" page.
>
>
> Thanks
>
> TW Scannell
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070923/5a781762/attachment.html 


More information about the Mongrel-users mailing list