Nathan Donaldson
2006-Aug-20 07:25 UTC
[Mongrel] Problem with: service mongrel_cluster start
Hi all, I am having trouble transitioning from fastcgi to Mongrel. I have it all working apart from one small part, I can''t get the service to start on boot. I have followed the instructions and if I call the script directly: i.e. "/etc/init.d/mongrel_cluster start" it works fine, but if I call it using "service mongrel_cluster start" it fails with the following error: Starting all mongrel_clusters... /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21: command not found: mongrel_rails cluster::start -c sonar_radiant.yml mongrel_rails cluster::start returned an error. I can see what is happening, it is calling mongrel_rails cluster::start -c config_file_without the directory. It should say: mongrel_rails cluster::start -c /etc/mongrel_cluster/sonar_radiant.yml Anyone know what I can do to fix this? Regards Nathan
Nathan Donaldson wrote:> Starting all mongrel_clusters... > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21: > command not found: mongrel_rails cluster::start -c sonar_radiant.yml > mongrel_rails cluster::start returned an error. > > I can see what is happening, it is calling mongrel_rails > cluster::start -c config_file_without the directory.No, "command not found" is being reported by the shell that runs mongrel_cluster_ctl from /etc/init.d/mongrel_cluster. You need get mongrel_rails into its PATH. Try something like: ln -s `find /usr/local -type f -name mongrel_rails 2>/dev/null | head -1` /usr/local/bin> It should say: > > mongrel_rails cluster::start -c /etc/mongrel_cluster/sonar_radiant.ymlThe path to the config file doesn''t need to be fully qualified. mongrel_cluster_ctl changes to CONF_DIR before executing the mongrel_railses. -Drew