Hello all, I''m trying to get mongrel set up under Apache, but first I''d like to test Mongrel to make sure it is set up correctly (before going through all the trouble with Apache). I''ve done the following so far: 1) Installed Mongrel 2) Set up a Rails site called test 3) Added a file called test.config to my /etc/mongrel/sites-enabled/ directory. 4) Started Mongrel I then did the following to start Mongrel sudo /etc/init.d/mongrel start test And received the following error message: line 43: /etc/mongrel/sites-enabled/test: No such file or directory Here are the contents of my /etc/mongrel/sites-enabled/test.config file: #RAILS_ROOT of your application dir=/home/wgant/Desktop/test #port the first mongrel instance should listen to, additional instances listen to ports above port=8100 #number of instances servers=3 #port pen will listen on proxy_port=8001 Any thoughts? I imagine that it''s probably something simple, but I don''t know what it is. --------------------------------- Do you Yahoo!? Get on board. You''re invited to try the new Yahoo! Mail. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On Oct 13, 2006, at 8:03 AM, Will Gant wrote:> I''m trying to get mongrel set up under Apache, but first I''d like > to test Mongrel to make sure it is set up correctly (before going > through all the trouble with Apache). > > I''ve done the following so far: > 1) Installed Mongrel > 2) Set up a Rails site called test > 3) Added a file called test.config to my /etc/mongrel/sites- > enabled/ directory. > 4) Started Mongrel > > I then did the following to start Mongrel > sudo /etc/init.d/mongrel start test > > And received the following error message: > line 43: /etc/mongrel/sites-enabled/test: No such file or directory > > Here are the contents of my /etc/mongrel/sites-enabled/test.config > file: > #RAILS_ROOT of your application > dir=/home/wgant/Desktop/test > #port the first mongrel instance should listen to, additional > instances listen to ports above > port=8100 > #number of instances > servers=3 > #port pen will listen on > proxy_port=8001You seem to be trying to use mongrel_cluster, not mongrel per-se... To debug, skip the init.d script and try starting directly: mongrel_rails cluster::start -c /etc/mongrel/sites-enabled/ test.config At Engine Yard, we use a very simple mongrel_cluster.yml file: cwd: /part/to/rails/root environment: production port: 5000 servers: 3 I think it''s interesting that your config file uses ''dir:'' where ours uses ''cwd:''. I don''t use pen, but I find it fascinating that pen configuration is in the mongrel_cluster config file, but perhaps that''s correct. -- -- Tom Mornini, CTO -- Engine Yard, Ruby on Rails Hosting -- Reliability, Ease of Use, Scalability -- (866) 518-YARD (9273) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
I tried the command that you suggested. Here''s the output: sudo mongrel_rails cluster::start -c /etc/mongrel/sites-enabled/test.config /usr/lib/ruby/gems/1.8/gems/mongrel_cluster-0.2.0/lib/mongrel_cluster/init.rb:30:in `merge!'': can''t convert String into Hash (TypeError) from /usr/lib/ruby/gems/1.8/gems/mongrel_cluster-0.2.0/lib/mongrel_cluster/init.rb:30:in `run'' from /usr/lib/ruby/1.8/mongrel/command.rb:203:in `run'' from /usr/bin/mongrel_rails:232 Just to clarify things for myself a bit. The test.config file is the file I included with the previous message. I don''t have a mongrel_cluster.yml file. Should I have one, and if so, where? Thanks, Will Tom Mornini <tmornini-W/9V78bTXriB+jHODAdFcQ@public.gmane.org> wrote: On Oct 13, 2006, at 8:03 AM, Will Gant wrote:> I''m trying to get mongrel set up under Apache, but first I''d like > to test Mongrel to make sure it is set up correctly (before going > through all the trouble with Apache). > > I''ve done the following so far: > 1) Installed Mongrel > 2) Set up a Rails site called test > 3) Added a file called test.config to my /etc/mongrel/sites- > enabled/ directory. > 4) Started Mongrel > > I then did the following to start Mongrel > sudo /etc/init.d/mongrel start test > > And received the following error message: > line 43: /etc/mongrel/sites-enabled/test: No such file or directory > > Here are the contents of my /etc/mongrel/sites-enabled/test.config > file: > #RAILS_ROOT of your application > dir=/home/wgant/Desktop/test > #port the first mongrel instance should listen to, additional > instances listen to ports above > port=8100 > #number of instances > servers=3 > #port pen will listen on > proxy_port=8001You seem to be trying to use mongrel_cluster, not mongrel per-se... To debug, skip the init.d script and try starting directly: mongrel_rails cluster::start -c /etc/mongrel/sites-enabled/ test.config At Engine Yard, we use a very simple mongrel_cluster.yml file: cwd: /part/to/rails/root environment: production port: 5000 servers: 3 I think it''s interesting that your config file uses ''dir:'' where ours uses ''cwd:''. I don''t use pen, but I find it fascinating that pen configuration is in the mongrel_cluster config file, but perhaps that''s correct. -- -- Tom Mornini, CTO -- Engine Yard, Ruby on Rails Hosting -- Reliability, Ease of Use, Scalability -- (866) 518-YARD (9273) --------------------------------- Get your own web address for just $1.99/1st yr. We''ll help. Yahoo! Small Business. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On Fri, 13 Oct 2006 08:03:41 -0700 (PDT) Will Gant <williamwgant-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> Hello all, > Here are the contents of my /etc/mongrel/sites-enabled/test.config file: > #RAILS_ROOT of your application > dir=/home/wgant/Desktop/test > #port the first mongrel instance should listen to, additional instances listen to ports above > port=8100 > #number of instances > servers=3 > #port pen will listen on > proxy_port=8001 >Don''t write your own config file by hand, use the -G option to Mongrel so that it gets generated correctly. You can then modify it from there. You do it like this: mongrel_rails start -G test.config -e production ... (where ... is any other options you need) It''ll then tell you it created test.config and you just need to run it with: mongrel_rails start -C test.config And that''s it. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
I tried creating the config file as you suggested. I think something else may be broken: wgant@sauron:/etc/mongrel/sites-enabled$ mongrel_rails start -G test.config -e production !!! Path to log file not valid: log/mongrel.log start reported an error. Use mongrel_rails start -h to get help. I then tried the following: wgant@sauron:/etc/mongrel/sites-enabled$ mongrel_rails start -G test.config -e production -l /home/wgant/mongrel.log !!! Path to pid file not valid: log/mongrel.pid start reported an error. Use mongrel_rails start -h to get help. wgant@sauron:/etc/mongrel/sites-enabled$ mongrel_rails start -G test.config -e production -l /home/wgant/mongrel.log -p /home/wgant/mongrel.pid !!! Path to pid file not valid: log/mongrel.pid start reported an error. Use mongrel_rails start -h to get help. wgant@sauron:/etc/mongrel/sites-enabled$ mongrel_rails start -G test.config -e production -l /home/wgant/mongrel.log -P /home/wgant/mongrel.pid !!! Path to docroot not valid: public start reported an error. Use mongrel_rails start -h to get help. By the way, are you "the" Zed that wrote Mongrel? Thanks, Will "Zed A. Shaw" <zedshaw-dd7LMGGEL7NBDgjK7y7TUQ@public.gmane.org> wrote: On Fri, 13 Oct 2006 08:03:41 -0700 (PDT) Will Gant wrote:> Hello all, > Here are the contents of my /etc/mongrel/sites-enabled/test.config file: > #RAILS_ROOT of your application > dir=/home/wgant/Desktop/test > #port the first mongrel instance should listen to, additional instances listen to ports above > port=8100 > #number of instances > servers=3 > #port pen will listen on > proxy_port=8001 >Don''t write your own config file by hand, use the -G option to Mongrel so that it gets generated correctly. You can then modify it from there. You do it like this: mongrel_rails start -G test.config -e production ... (where ... is any other options you need) It''ll then tell you it created test.config and you just need to run it with: mongrel_rails start -C test.config And that''s it. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. --------------------------------- Get your own web address for just $1.99/1st yr. We''ll help. Yahoo! Small Business. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On 10/14/06, Will Gant <williamwgant-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> > I tried creating the config file as you suggested. I think something else > may be broken: > > wgant@sauron:/etc/mongrel/sites-enabled$ mongrel_rails start -G > test.config -e production > !!! Path to log file not valid: log/mongrel.log > start reported an error. Use mongrel_rails start -h to get help.Are you calling this from within a Rails application''s root (doesn''t look like it)? You should be. Matt I then tried the following:> > wgant@sauron:/etc/mongrel/sites-enabled$ mongrel_rails start -G > test.config -e production -l /home/wgant/mongrel.log > !!! Path to pid file not valid: log/mongrel.pid > start reported an error. Use mongrel_rails start -h to get help. > wgant@sauron:/etc/mongrel/sites-enabled$ mongrel_rails start -G > test.config -e production -l /home/wgant/mongrel.log -p > /home/wgant/mongrel.pid > !!! Path to pid file not valid: log/mongrel.pid > start reported an error. Use mongrel_rails start -h to get help. > wgant@sauron:/etc/mongrel/sites-enabled$ mongrel_rails start -G > test.config -e production -l /home/wgant/mongrel.log -P > /home/wgant/mongrel.pid > !!! Path to docroot not valid: public > start reported an error. Use mongrel_rails start -h to get help. > > By the way, are you "the" Zed that wrote Mongrel?He answers to many names. "Zed" is one of them. Thanks,> Will > > *"Zed A. Shaw" <zedshaw-dd7LMGGEL7NBDgjK7y7TUQ@public.gmane.org>* wrote: > > > On Fri, 13 Oct 2006 08:03:41 -0700 (PDT) > Will Gant wrote: > > > Hello all, > > Here are the contents of my /etc/mongrel/sites-enabled/test.config file: > > #RAILS_ROOT of your application > > dir=/home/wgant/Desktop/test > > #port the first mongrel instance should listen to, additional instances > listen to ports above > > port=8100 > > #number of instances > > servers=3 > > #port pen will listen on > > proxy_port=8001 > > > > Don''t write your own config file by hand, use the -G option to Mongrel so > that it gets generated correctly. You can then modify it from there. You do > it like this: > > mongrel_rails start -G test.config -e production ... > > (where ... is any other options you need) > > It''ll then tell you it created test.config and you just need to run it > with: > > mongrel_rails start -C test.config > > And that''s it. > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > > ------------------------------ > Get your own web address for just $1.99/1st yr. We''ll help. Yahoo! Small > Business<http://us.rd.yahoo.com/evt=41244/*http://smallbusiness.yahoo.com/>. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---