Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way in Ubuntu to have rake commands (Ruby) available on the command line?

I solved adding the following line to bashrc, but I think there should be a better way.

export PATH=$PATH:$HOME/bin:/var/lib/gems/1.8/bin

Have I forgot something?

share|improve this question
up vote 3 down vote accepted

You can use RVM, it's a really great system to manage you ruby version and add all command needed in your PATH.

share|improve this answer
+1 RVM is wonderful. Somewhat overkill if you are only using it to export the PATH, but it has a LOT of very useful features. – David Oneill Dec 21 '10 at 14:19

That is sufficient to allow you to run all executables that were installed from gems for Ruby 1.8 from the command line without using the full path. They are technically available already but you have to type the full path eg.

/var/lib/gems/1.8/bin/some-command arguments

Adding /var/lib/gems/1.8/bin to your $PATH is a perfectly valid shortcut to allow you to use the executables as normal commands eg.

some-command arguments
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.