Installing Ruby gem not working - GEM_PATH

I am 100% new to Ruby. I had a problem installing rubygems. Any help is appreciated.

Problem

When rvm rubygems latest starts rvm rubygems latest I get this error:

 Error running 'env GEM_PATH=/Users/sjc/.rvm/gems/ruby-2.0.0-p0:/Users/ sjc/.rvm/gems/ ruby-2.0.0-p0@global :/Users/sjc/.rvm/gems/ruby-2.0.0-p0: /Users/sjc/.rvm/gems/ ruby-2.0.0-p0@global GEM_HOME=/Users/sjc/.rvm/gem s/ruby-2.0.0-p0 /Users/sjc/.rvm/rubies/ruby-2.0.0-p0/bin/ruby /Users/s jc/.rvm/src/rubygems-2.0.0/setup.rb', please read /Users/sjc/.rvm/log/ ruby-2.0.0-p0/rubygems.install.log 

The log (rubygems.install.log) has the following:

 [2013-03-05 20:31:37] /Users/sjc/.rvm/rubies/ruby-2.0.0-p0/bin/ruby /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- openssl (LoadError) from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/security.rb:8:in `<top (required)>' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/package.rb:43:in `<top (required)>' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/installer.rb:8:in `<top (required)>' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/request_set.rb:5:in `<top (required)>' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems.rb:195:in `finish_resolve' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/rdoc.rb:14:in `<top (required)>' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/uninstaller.rb:10:in `<top (required)>' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/commands/setup_command.rb:440:in `uninstall_old_gemcutter' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/commands/setup_command.rb:144:in `execute' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/command.rb:305:in `invoke_with_build_args' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/command_manager.rb:170:in `process_args' from /Users/sjc/.rvm/src/rubygems-2.0.0/lib/rubygems/command_manager.rb:130:in `run' from /Users/sjc/.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 

Since I did not know what I was doing, I think that my previous attempt to install sass could have caused this. I followed these instructions , thereby executing these commands at the beginning of the day.

 $ export GEM_HOME=/home/mygemrepository $ ruby setup.rb --prefix=/home/mystuff 

Again, I do not want this to look like GEM_HOME and GEM_PATH.

 $ echo $GEM_HOME /Users/sjc/.rvm/gems/ruby-2.0.0-p0 $ echo $GEM_PATH /Users/sjc/.rvm/gems/ruby-2.0.0-p0:/Users/sjc/.rvm/gems/ ruby-2.0.0-p0@global 

Is there anything I can / should do to successfully install rubygems?

Any help is appreciated.
+4
source share
2 answers

It looks like you are missing openssl. Checkout: https://rvm.io/packages/openssl/

+5
source

Another possible problem is if your version of Ruby is deprecated by default.

Most OSs come pre-installed with Ruby, but use older versions of Ruby (1.8.x) rather than 2.x or even 1.9.x, and this may cause the new version of rvm to crash.

$ rvm list to see a list of ruby ​​versions, and use (equivalent to "ruby use uby-1.9.3-p429") to install this, then try: $ rvm stabilizes (get the latest fixes and updates to the Ruby version) $ rvm rubygems last

I also changed the default ruby: $ rvm --default use 1.9.2

worked for me!

0
source

All Articles