Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Troubles with ruby-2.X installation using RVM

Tags:

ruby

rvm

I recently came across of the ruby-2.0.0-p0 installation. After the successfully installation of the rvm i type the following command at the bash.

rvm install ruby-2.0.0-p0

This this the result log.

Searching for binary rubies, this might take some time.
No binary rubies available for: debian/wheezy_sid/i386/ruby-2.0.0-p0.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /home/javier/.rvm/rubies/ruby-2.0.0-p0, this may take a while depending on your cpu(s)...
ruby-2.0.0-p0 - #downloading ruby-2.0.0-p0, this may take a while depending on your connection...
ruby-2.0.0-p0 - #extracting ruby-2.0.0-p0 to /home/javier/.rvm/src/ruby-2.0.0-p0
ruby-2.0.0-p0 - #extracted to /home/javier/.rvm/src/ruby-2.0.0-p0
ruby-2.0.0-p0 - #configuring
ruby-2.0.0-p0 - #compiling
ruby-2.0.0-p0 - #installing
Removing old Rubygems files...
Installing rubygems-2.0.0 for ruby-2.0.0-p0 ...
Error running 'env GEM_PATH=/home/javier/.rvm/gems/ruby-2.0.0-p0:/home/javier/.rvm/gems/ruby-2.0.0-p0@global:/home/javier/.rvm/gems/ruby-2.0.0-p0:/home/javier/.rvm/gems/ruby-2.0.0-p0@global GEM_HOME=/home/javier/.rvm/gems/ruby-2.0.0-p0 /home/javier/.rvm/rubies/ruby-2.0.0-p0/bin/ruby /home/javier/.rvm/src/rubygems-2.0.0/setup.rb', please read /home/javier/.rvm/log/ruby-2.0.0-p0/rubygems.install.log
Installation of rubygems did not complete successfully.
Saving wrappers to '/home/javier/.rvm/bin'.
ruby-2.0.0-p0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-2.0.0-p0 - #importing default gemsets, this may take time ...
Install of ruby-2.0.0-p0 - #complete
Making gemset ruby-2.0.0-p0 pristine.
Error running '' under ,
please read /home/javier/.rvm/log/ruby-2.0.0-p0/gemset.pristine.log
Making gemset ruby-2.0.0-p0@global pristine.
Error running '' under ,
please read /home/javier/.rvm/log/ruby-2.0.0-p0/gemset.pristine.log

Note that the process goes without troubles until the installation of ruby gems. What's going on here ??

Any help appreciated.

First comment output

cat /home/javier/.rvm/log/ruby-2.0.0-p0/rubygems.install.log
/home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- openssl (LoadError)
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/security.rb:8:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/package.rb:43:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/installer.rb:8:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/request_set.rb:5:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems.rb:195:in `finish_resolve'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/rdoc.rb:14:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/uninstaller.rb:10:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/commands/setup_command.rb:440:in `uninstall_old_gemcutter'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/commands/setup_command.rb:144:in `execute'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/command.rb:305:in `invoke_with_build_args'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/command_manager.rb:170:in `process_args'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/command_manager.rb:130:in `run'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/gem_runner.rb:60:in `run'
from setup.rb:45:in `<main>'
RubyGems 2.0.0 installed

Second comment output And the other command

rvm use --default 2.0.0
RVM is not a function, selecting rubies with 'rvm use ...' will not work.

You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for a example.
like image 502
Javier Cadiz Avatar asked Mar 05 '13 19:03

Javier Cadiz


2 Answers

Try the following

$ rvm remove 2.0.0 # get rid of unsuccessful installation
$ rvm get head --autolibs=3 # get the latest RVM and build required libs
$ rvm requirements # just in case, install all other required stuff
$ rvm install ruby-2.0.0

If at any of those commands fails at any point. Update your question with the logs.

like image 116
Leo Correa Avatar answered Oct 03 '22 22:10

Leo Correa


I had this exact same problem. The solution was elegant and simple.

Just update your gems direct from the command line:

sudo gem update --system

That's it! Terminal will now show:

Updating RubyGems
Updating rubygems-update
Successfully installed rubygems-update-2.0.3
Updating RubyGems to 2.0.3
Installing RubyGems 2.0.3
RubyGems 2.0.3 installed
like image 27
AcroYogi Avatar answered Oct 03 '22 20:10

AcroYogi