Forum: Ruby on Rails Mongrel and RubyInline

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Dce90ceb553a872aa5c621c363c5ff57?d=identicon&s=25 Bosko Milekic (Guest)
on 2007-05-23 21:45
(Received via mailing list)
If you have a Rails application which requires the RubyInline gem
(either directly or through something else like ImageScience), then
you might have problems if you are using sudo in capistrano or doing a
'mongrel_cluster_ctl start' from a root shell on a machine where you
have multiple Rails applications all set to run as different users.

The problem is due to the fact that RubyInline wants to be able to
read and write to ENV['HOME'] + ".ruby_inline/", but mongrel does not
set ENV['HOME'] in Configurator#change_privilege according to the
--user value passed in to mongrel_rails.

At least one person bumped into this in a rather sick way almost
exactly a month ago on ruby forum: - The solution that was
proposed to him was to add the ENV['HOME'] hack in each of his
applications' environment.rb before the first RubyInline require

I prefer the patch attached, which is a small 2-line patch to mongrel
that sets ENV['HOME'] from getpwnam.dir in
Configurator#change_privilege, right after the UID switch.

I don't know if Zed reads this list or cares to commit it to his tree
(since it's not exactly a mongrel flaw), but if you run into the
problem, feel free to use it.

Bosko Milekic <>
This topic is locked and can not be replied to.