Mongrel Cluster fails to start

Mongrel Cluster fails to start

Hello,

I have an issue with Mongrel cluster start-up, when I start the cluster
I am getting the following error:
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
‘gem_original_require’: no such file to load –
/home/admin/test-project/test-app/config/environment (LoadError)

[I have attached the log file along with this post]

I am using this command to start the server (as root):
cd <rails_app_path>/config/environment
mongrel_rails cluster::start

For mongrel set-up I did the following (as root):

  1. sudo gem install mongrel --include-dependencies
  2. sudo gem install mongrel_cluster --include-dependencies
  3. create mongrel user
    useradd -r mongrel
  4. groupadd www-data
  5. chown -R mongrel:www-data <rails_app_path>
  6. mongrel_rails cluster::configure -e production -p 3007 -N 2 -c
    <rails_app_path> -a 127.0.0.1 --user mongrel --group www-data

I have checked the permissions on the files in the config folder and
they are as follows:

-rw-r–r-- 1 mongrel www-data 2795 Aug 10 03:24 boot.rb
-rw-r–r-- 1 mongrel www-data 255 Aug 24 13:01 database.yml
-rw-r–r-- 1 mongrel www-data 319 Aug 24 12:51 database.yml.bak
-rw-r–r-- 1 mongrel www-data 2086 Aug 27 11:22 environment.rb
drwxr-xr-x 2 mongrel www-data 4096 Aug 27 08:46 environments
drwxr-xr-x 2 mongrel www-data 4096 Aug 10 03:24 initializers
drwxr-xr-x 2 mongrel www-data 4096 Aug 10 03:24 locales
-rw-r–r-- 1 mongrel www-data 278 Aug 27 12:09 mongrel_cluster.yml
-rw-r–r-- 1 mongrel www-data 4037 Aug 22 09:49 routes.rb

Other details:

  1. I have attached the mongrel_cluster.yml file along with this post.
  2. OS - CentOS release 5.4
  3. Ruby - v 1.8.7
  4. Gem - v 1.3.7
  5. Rails - v 2.3.8
  6. Mongrel - v 1.1.5
  7. Mongrel Cluster - v 1.0.5

“mongrel_rails start” works fine.

Any help would be appreciated.

Thank you.

Govind Naroji

Attaching mongrel_cluster.yml

  • Govind Naroji

Correction:
I am using this command to start the server (as root):
cd <rails_app_path>
mongrel_rails cluster::start

Govind Naroji dijo [Fri, Aug 27, 2010 at 07:40:16PM +0200]:

[I have attached the log file along with this post]
(…)

Just stating what’s obvious: Does your application work without
Mongrel? As the www-data user? It smells to me that you have
downloaded your Gems in your user’s home directory, and they are not
available for www-data.