I'm installing Ruby on Rails on Virtual Box/Ubuntu 13.10. Below are the steps
ruby -v
=> The program 'ruby' can be found in the following packages ... Try: sudo apt-get install
source /my account/...
==> Ok.
\curl -L https://get.rvm.io | bash
=> I've got a message thanking me for using RVM. In case of problems, I should consult their website or twitter.
rvm requirements
==> Requirments installation successful.
type rvm | head -n 1
==> rvm is a function
rvm list known
==> I get a list of ruby's versions
rvm install 2.0.0 -C --enable-shared, --with-openssl-dir=/usr/local
==> Install of ruby 2.0.0 complete. Please consider upgrading to ruby 2.1.0 ...
rvm list
==> rvm rubies =* ruby-2.0.0-p353 [i686 ]
# => - current
# =* - current && default
# * - current
rvm use 2.0.0@railstutorial_rails_4_0 --create --default
==> ok.
rvm gemset list
==> gemsets for ruby-2.0.0-p353 ...
(default)
global
=> railstutorial_rails_4_0
gem -v
=> The program 'gem' can be found in the following packages:
- ruby1.9.1
- rubygems try: sudo apt-get install
Why do I need to install ruby again? I thought I did so in step 7. I've gone over and over the same steps but I don't understand why it keeps telling me to install ruby again.
Thanks for helping
It sounds like the rvm ruby is not actually being used. If you run
ruby -v
, what do you get? I suspect it will be the message from the system about ruby being available in a package. Are you sure your $PATH is set correctly?If you run
/bin/bash --login
and try again what happens?check what
rvm list
returns.I had multiple ruby versions installed but had not selected the ruby version to use.
I did
rvm use <ruby_version> --default
thenruby
as well asgem
command worked.On your Terminal window go to Edit>Profile Preferences>Title and command, and check the box that says "Run command as a login shell". Restart your Terminal and try ruby -v and gem -v now. The versions should come up. If they don't then try re-installing them.