Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem with upgrading rubygems via rvm

Trying to updgrade RubyGems to version 1.8.10 via RVM and this error:

$ rvm rubygems latest
Removing old Rubygems files...
Installing rubygems-1.8.10 for ruby-1.9.2-p180 ...
ERROR: Error running 'GEM_PATH="/Users/foo/.rvm/gems/ruby-1.9.2-p180:/Users/foo/.rvm/gems/ruby-1.9.2-p180@global:/Users/foo/.rvm/gems/ruby-1.9.2-p180:/Users/foo/.rvm/gems/ruby-1.9.2-p180@global" GEM_HOME="/Users/foo/.rvm/gems/ruby-1.9.2-p180" "/Users/foo/.rvm/rubies/ruby-1.9.2-p180/bin/ruby" "/Users/foo/.rvm/src/rubygems-1.8.10/setup.rb"', please read /Users/foo/.rvm/log/ruby-1.9.2-p180/rubygems.install.log
WARN: Installation of rubygems did not complete successfully.

When checking the log file (rubygems.install.log) this is generated from installation:

[2011-09-27 21:16:57] GEM_PATH="/Users/foo/.rvm/gems/ruby-1.9.2-
p180:/Users/foo/.rvm/gems/ruby-1.9.2-p180@global:/Users/foo/.rvm/gems/ruby-1.9.2-p180:/Users/foo/.rvm/gems/ruby-1.9.2-p180@global" GEM_HOME="/Users/foo/.rvm/gems/ruby-1.9.2-p180" "/Users/foo/.rvm/rubies/ruby-1.9.2-p180/bin/ruby" "/Users/foo/.rvm/src/rubygems-1.8.10/setup.rb"
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/f_sync_dir.rb, skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_header.rb, skipping
unable to convert U+00E1 to US-ASCII in conversion from ISO-8859-1 to UTF-8 to US-ASCII for lib/rubygems/package/tar_input.rb, skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_output.rb, skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_reader/entry.rb, skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_reader.rb, skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_writer.rb, skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package.rb, skipping
unable to convert U+0160 from UTF-8 to US-ASCII for History.txt, skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/f_sync_dir.rb, skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_header.rb, skipping
unable to convert U+00E1 to US-ASCII in conversion from ISO-8859-1 to UTF-8 to US-ASCII for lib/rubygems/package/tar_input.rb, skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_output.rb, skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_reader/entry.rb, skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_reader.rb, skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package/tar_writer.rb, skipping
unable to convert U+00E1 from UTF-8 to US-ASCII for lib/rubygems/package.rb, skipping
unable to convert U+0160 from UTF-8 to US-ASCII for History.txt, skipping
ERROR:  While executing gem ... (RDoc::Error)
    error generating index.html: Error while evaluating /Users/foo/.rvm/gems/ruby-1.9.2-p180/gems/rdoc-3.9/lib/rdoc/generator/template/darkfish/index.rhtml: undefined method `[]' for nil:NilClass (RDoc::Error)
RubyGems 1.8.10 installed

Does anyone have an idea of ​​what could be wrong with the update? Have tried to remove rubygems via the RVM also, and then run the update again but no luck with it.

Update: Seems like rvm could not run Ruby 1.9.2.

$ rvm use 1.9.2 WARN: ruby ruby-1.9.2-p290 is not installed. To install do: 'rvm install ruby-1.9.2-p290' 

So after installing 1.9.2-p290 the installation of rubygems completed successfully.

$ rvm use 1.9.2
Using /Users/foo/.rvm/gems/ruby-1.9.2-p290

$ rvm rubygems latest
Removing old Rubygems files...
Installing rubygems-1.8.10 for ruby-1.9.2-p290 ...
Installation of rubygems completed successfully.

That worked for me.

like image 576
GLindqvist Avatar asked Sep 27 '11 20:09

GLindqvist


People also ask

How do I download RubyGems?

Open up the 'Software Center' app from your launcher and type in `RubyGems` without quotes into the application search box at the top right, and press [enter]. RubyGems then can be installed by just clicking on the button labeled 'Install', thats it.


2 Answers

Seems like rvm could not run Ruby 1.9.2.

$ rvm use 1.9.2 
WARN: ruby ruby-1.9.2-p290 is not installed. To install do: 'rvm install ruby-1.9.2-p290'

So after installing 1.9.2-p290 the installation of rubygems completed successfully.

$ rvm use 1.9.2
Using /Users/foo/.rvm/gems/ruby-1.9.2-p290

$ rvm rubygems latest
Removing old Rubygems files...
Installing rubygems-1.8.10 for ruby-1.9.2-p290 ...
Installation of rubygems completed successfully.

That worked for me.

like image 62
GLindqvist Avatar answered Oct 13 '22 00:10

GLindqvist


I fixed it by removing this file .gemrc in root

cd ~
rm .gemrc
rvm rubygems latest
like image 24
dbKooper Avatar answered Oct 12 '22 23:10

dbKooper