Ruby Gems on Ubuntu 8.10
Thursday, November 20th, 2008Today I was setting up ruby, rails and capistrano on Ubuntu 8.10. It turns out that the gems binary path was not in my path.
To fix it, edit your ~/.bashrc file.
gedit ~/.bashrc
Add these lines to the bottom of the file.
#Export the path for Ruby Gems
export PATH=$PATH:/var/lib/gems/1.8/bin
Save it and then source the file (to save you from logging-out and back in again).
source ~/.bashrc
Then you should be able to run capistrano as you would expect.
Please note: There are potential problems with this as Ruby Gems can install system libraries in this path that end up being used instead of the correct system ones. This can potentially cause problems. See Launchpad bug #262063 for a discussion of the issue.