# Mongrel\_cluster and sudo to new user/group

**URL:** <https://www.ruby-forum.com/t/mongrel-cluster-and-sudo-to-new-user-group/117610>\
**Category:** Deployment\
**Created:** [October 18, 2007, 4:35pm UTC](https://www.ruby-forum.com/t/mongrel-cluster-and-sudo-to-new-user-group/117610 "2007-10-18T16:35:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrochkind](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Post date:** [October 18, 2007, 4:35pm UTC](https://www.ruby-forum.com/t/mongrel-cluster-and-sudo-to-new-user-group/117610/1 "2007-10-18T16:35:53Z")

</div>

I’m having trouble getting my mongrel\_cluster to start up as a specified  
user/group.

If I don’t have a user/group specified in mongrel\_cluster.yml, I can  
start up my app with ‘mongrel\_rails cluster::start’, no problem.

As soon as I put a user and group in, and I do ‘sudo mongrel\_rails  
cluster::start’, my process does NOT start up. And I get this in my  
mongrel log:

/usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_requi re': no such file to load -- /home/rochkind/U2/config/environment (LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`requi  
re’  
from  
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:155:  
in `rails' [... omitted middle of stack trace -jrochkind ...] from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 from /usr/bin/mongrel_rails:18:in`load’  
from /usr/bin/mongrel\_rails:18

Here’s what my mongrel\_cluster.yml looks like:

* * *

user: umlaut  
group: umlaut  
prefix: /utest  
cwd: /home/rochkind/U2/  
log\_file: log/mongrel.log  
port: “3001”  
environment: production  
pid\_file: tmp/pids/mongrel.pid  
servers: 1

Any ideas? I’m at my wits end here.

---

<div class="post-metadata">

**Author:** ![jrochkind](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Post date:** [October 18, 2007, 8:31pm UTC](https://www.ruby-forum.com/t/mongrel-cluster-and-sudo-to-new-user-group/117610/2 "2007-10-18T20:31:36Z")

</div>

Jonathan R. wrote:

> I’m having trouble getting my mongrel\_cluster to start up as a specified  
> user/group.

[…]

> /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
> `gem\_original\_require’: no such file to load – /home/rochkind/U2/config/environment (LoadError)

Answering my own question, cause I can find this question on google, but  
not an answer: My apps directory was not properly accessible from the  
account I was trying to run it under. The app directories _parent_ dir  
needed ‘x’ permissions for the account I was telling mongrel\_cluster to  
run as.

As a result, mongrel\_cluster couldn’t properly ‘cd’ to the app  
directory. I figured that out by actually manually 'su’ing to the  
account in question, and trying to start with mongrel\_rails  
cluster:start without a ‘user:/group:’ configured in the  
mongrel\_cluster.yml. Under that scenario, I got an accurate error  
message warning me of the problem. Under the other scenario where you  
use ‘sudo’ and put account/group in mongrel\_cluster.yml, for some reason  
instead of getting the informative error message you get that weird  
misdirected one that looks like a (weird) gem loading error. But at any  
rate, I have solved my problem.
