GabrielCol
GabrielCol

Reputation: 181

Installing Ruby/Rubygems error @ Ubuntu

I'm trying to install Ruby on Rails on Ubuntu following the steps from "How to Install Ruby on Rails on Ubuntu 12.04 LTS (Precise Pangolin) with RVM".

Everything worked well until here:

gabi@ubuntu:~$ rvm rubygems current
Removing old Rubygems files...
Installing rubygems-1.8.25 for ruby-1.9.3-p385 ...
Error running 'env GEM_PATH=/home/gabi/.rvm/gems/ruby-1.9.3-p385:/home/gabi/.rvm/gems/ruby-1.9.3-p385@global:/home/gabi/.rvm/gems/ruby-1.9.3-p385:/home/gabi/.rvm/gems/ruby-1.9.3-p385@global GEM_HOME=/home/gabi/.rvm/gems/ruby-1.9.3-p385 /home/gabi/.rvm/rubies/ruby-1.9.3-p385/bin/ruby /home/gabi/.rvm/src/rubygems-1.8.25/setup.rb', please read /home/gabi/.rvm/log/ruby-1.9.3-p385/rubygems.install.log
Installation of rubygems did not complete successfully.

The log file looks like this:

/home/gabi/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/yaml.rb:36:in `remove_method': method `to_yaml' not defined in Object (Nam
eError)
  from /home/gabi/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/yaml.rb:36:in `yamler='
  from /home/gabi/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/yaml.rb:33:in `class_eval'
  from /home/gabi/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/yaml.rb:33:in `yamler='
  from /home/gabi/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/yaml.rb:76:in `<top (required)>'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems/custom_require.rb:36:in `require'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems/custom_require.rb:36:in `require'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems.rb:680:in `load_yaml'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems/config_file.rb:249:in `load_file'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems/config_file.rb:190:in `initialize'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems/gem_runner.rb:78:in `new'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems/gem_runner.rb:78:in `do_configuration'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems/gem_runner.rb:51:in `run'
  from setup.rb:38:in `<main>'

What's exactly the issue and how can I solve it?

Upvotes: 1

Views: 870

Answers (2)

GabrielCol
GabrielCol

Reputation: 181

Not sure what was the problem, I think something went wrong on installing, however I managed to make it work by using the quick fix from here:

  1. Update RVM using: rvm get head
  2. Remove all the manually installed packages using: rvm pkg remove
  3. Install the required libraries using: rvm requirements run
  4. Reinstall Ruby using: rvm reinstall 1.9.3

Upvotes: 1

TakaGoto
TakaGoto

Reputation: 362

Only thing I could think of is if you're using the wrong Ruby version. If you're using rm, type rvm current and see if it's Ruby 1.9.

Upvotes: 0

Related Questions