0

I've never used Ruby before so this and the surrounding terminology is new to me; I'm only doing the install so I have a base to run a specific application.

I need Ruby 1.9.3, as I understand it I should be using RVM as it'll make things less complicated with version conflicts (I'm using Ubuntu 12.04 LTS and already seem to have 1.8 & 1.9.1).

Problem is that I'm still getting version conflicts, what am I doing wrong please?

Details follow:

On a vanilla ubuntu 12.04 LTS I install rvm & bundler

sudo apt-get install ruby-bundler ruby-rvm

I have a .rvmrc file in my project root containing:

rvm use 1.9.3-p484@project-root --create

I have executed sudo rvm reload

I then tell rvm to install a particular ruby

sudo rvm install ruby-1.9.3-p484

and it barfs

Installing rubygems for /usr/share/ruby-rvm/rubies/ruby-1.9.3-p484/bin/ruby

ERROR: Error running 'GEM_PATH="/usr/share/ruby-rvm/gems/ruby-1.9.3-p484:/usr/share/ruby- rvm/gems/ruby-1.9.3-p484@global:/usr/share/ruby-rvm/gems/ruby-1.9.3-p484:/usr/share/ruby- rvm/gems/ruby-1.9.3-p484@global" GEM_HOME="/usr/share/ruby-rvm/gems/ruby-1.9.3-p484" "/usr/share/ruby-rvm/rubies/ruby-1.9.3-p484/bin/ruby" "/usr/share/ruby-rvm/src/rubygems-1.6.2/setup.rb"', please read /usr/share/ruby-rvm/log/ruby-1.9.3-p484/rubygems.install.lo

The log contains this:

/usr/share/ruby-rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/rubygems.rb:483:in find_files': undefined methodmap' for Gem::Specification:Class (NoMethodError) from /usr/share/ruby-rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/rubygems.rb:1108:in load_plugins' from /var/cache/ruby-rvm/src/rubygems-1.6.2/lib/rubygems/gem_runner.rb:84:in ' from /usr/share/ruby-rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /usr/share/ruby-rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /usr/share/ruby-rvm/src/rubygems-1.6.2/setup.rb:25:

Looks like some conflict with v1.9.1?

If I go ahead anyway and run sudo bundle install (I have a Gemfile with some entries) i get a different error implying that bundler is using ruby 1.8!

Installing nokogiri (1.6.1) /usr/lib/ruby/vendor_ruby/1.8/rubygems/installer.rb:388:in `ensure_required_ruby_version_met': nokogiri requires Ruby version >= 1.9.2. (Gem::InstallError)

What am I doing wrong please?

The only other salient info I can give is the output from rvm info as you can see I have paths empty and the 'binary' is incorrect.

system:

system: uname: "Linux ubuntu 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 15:31:16 UTC 2013 i686 i686 i386 GNU/Linux" bash: "/bin/bash => GNU bash, version 4.2.25(1)-release (i686-pc-linux-gnu)" zsh: " => not installed"

rvm: version: "rvm 1.6.9 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]"

homes: gem: "not set" ruby: "not set"

binaries: ruby: "/usr/bin/ruby" irb: "/usr/bin/irb" gem: "/usr/bin/gem" rake: ""

environment: PATH: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/share/ruby-rvm/bin:/usr/share/ruby-rvm/bin" GEM_HOME: "" GEM_PATH: "" MY_RUBY_HOME: "" IRBRC: "" RUBYOPT: "" gemset: ""

/usr/bin/ruby -v returns 1.8.7

0

Apparently the version of RVM that comes with Ubuntu is broken. I deleted it and followed the instructions in this SO post.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.