James R.
James R.

Reputation: 840

Rubygems now requires Ruby 1.8.7 or later?

I am very new to Linux and Ruby and am very interested in learning Rails development.

I have been going around in circles trying to figure out how to install Ruby and Rubygems. I had Ruby 1.8.6 installed, but then decided that I should use RVM.

I installed Ruby 2.0.0 with RVM. I then downloaded and tried to install Rubygems 2.0.7. which tells me that Rubygems requires 1.8.7, but my version clearly shows I have 2.0.0.

I am using Linux Mint 15.

Someone please help this newbie.

james@dev1 ~/rubygems-2.0.7 $ sudo ruby setup.rb
Rubygems now requires Ruby 1.8.7 or later
james@dev1 ~/rubygems-2.0.7 $ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
james@dev1 ~/rubygems-2.0.7 $ 

Upvotes: 0

Views: 617

Answers (1)

lurker
lurker

Reputation: 58324

RVM sets up a Ruby environment for a specific user.

In this case, you configured it for your account "james". And, you evidently installed Ruby 2.0.0 on your account via rvm.

When you do a sudo ruby setup.rb you are running Ruby as root. That is, it's like logging in as root then running ruby setup.rb from the command line.

root doesn't have an RVM configured Ruby so it uses the system default, which is evidently version 1.8.7.

Upvotes: 1

Related Questions