Hi,

I've been successfully running Rails + Capistrano on a MediaTemple dv.
After upgrading to a new dv server, Capistrano started failing. The
error that I'm getting is:

/usr/local/rubygems/gems/bin/mongrel_rails:9:in `require': no such
file to load -- rubygems (LoadError)
from /usr/local/rubygems/gems/bin/mongrel_rails:9 command finished

It is strange that the task found mongrel_rails which is in rubygems,
but then it cannot find the rubygems library.

The following did NOT work:
1. changing PermitUserEnvironment to 'yes' in sshd_config and adding
an environment file in the .ssh directory (as explained in
http://blog.pretheory.com/arch/2008/02/capistrano_path_and_environmen.php)
2. set :use_sudo, false in recipe
3. set :_MT_ENV, "PATH=/usr/local/rubygems/gems/bin:/usr/local/
rubygems/bin:$PATH RUBYLIB=/usr/local/rubygems/lib GEM_HOME=/usr/local/
rubygems/gems" - and appending this to all commands
4. create .bash_rc with line "source /etc/profile"

All trouble comes from the fact that the Ruby environment has been
installed at non-standard paths (as suggested by the good people at
MediaTemple). However, all Ruby environment variables are then sourced
in bash. This is what I have in /etc/profile.d/...:
export GEM_HOME=/usr/local/rubygems/gems
export GEM_PATH=/usr/local/rubygems/gems
export RUBYLIB=/usr/local/rubygems/lib
export PATH=/usr/local/rubygems/gems/bin:/usr/local/rubygems/bin:$PATH

All commands work when ssh-ing directly on the server. I know that
Capistrano opens a non-interactive session, that is why it is probably
not loading all environment variables. However, I need to make this
work... how can I do it?

Thanks,
Tiberiu

--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to 
capistrano-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to