views:

31

answers:

1

Hi,

I'm deploying a rails application using Capistrano to a shared server (on WebFaction). This means there are several different Ruby version installed there.

Everything works fine until I want to run some rake tasks. These tasks fail by saying I don't have the right RubyGems version.

From this thread I understood that fixing it would be as easy as adding the full path to the correct rake folder to my rake commands. I tried that but failed again, now because the Ruby interpreter that is used is the wrong one.

I assumed that capistrano would use the username/password I gave it to run commands on the server but it seems not to be the case.

Am I missing something? How can I fix that?

Thanks!

A: 

This is indeed a path issue. I solved it by symlinking my ruby, rake, and rails executables to my path. For instance, if the executables that you want (but are failing to work) are located at /opt/ruby/bin/ruby, you'll symlink it to:
ln -s /opt/ruby/bin/ruby /usr/local/bin/ruby

Faisal
should I add this line to the capistrano script?
Shay Friedman
No, log into your server (where the rake task is going to be run), and run that command.
Faisal