Manish Sapariya
Manish Sapariya

Reputation: 3605

not able to install rails3 on rvm

When trying to install rails3 using rvm, I get following error.

$ gem install rails
/data/home/manish/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:28:in `<top (required)>': uninitialized constant Gem::ConfigFile (NameError)
        from /data/home/manish/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /data/home/manish/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /data/home/manish/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:8:in `<top (required)>'
        from /data/home/manish/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /data/home/manish/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /data/home/manish//.rvm/rubies/ruby-1.9.2-p180/bin/gem:9:in `<main>'

Here is my rvm information

$ rvm info

ruby-1.9.2-p180:

  system:
    uname:       "Linux alioth-linux.gslab.com 2.6.23.1-42.fc8 #1 SMP Tue Oct 30 13:55:12 EDT 2007 i686 i686 i386 GNU/Linux"
    bash:        "/bin/bash => GNU bash, version 3.2.25(1)-release (i386-redhat-linux-gnu)"
    zsh:         "/bin/zsh => zsh 4.3.4 (i386-redhat-linux-gnu)"

  rvm:
    version:      "rvm 1.6.2 by Wayne E. Seguin ([email protected]) [https://rvm.beginrescueend.com/]"

  ruby:
    interpreter:  "ruby"
    version:      "1.9.2p180"
    date:         "2011-02-18"
    platform:     "i686-linux"
    patchlevel:   "2011-02-18 revision 30909"
    full_version: "ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]"

  homes:
    gem:          "/data/home/manish//.rvm/gems/ruby-1.9.2-p180"
    ruby:         "/data/home/manish//.rvm/rubies/ruby-1.9.2-p180"

  binaries:
    ruby:         "/data/home/manish//.rvm/rubies/ruby-1.9.2-p180/bin/ruby"
    irb:          "/data/home/manish//.rvm/rubies/ruby-1.9.2-p180/bin/irb"
    gem:          "/data/home/manish//.rvm/rubies/ruby-1.9.2-p180/bin/gem"
    rake:         "/data/home/manish//.rvm/rubies/ruby-1.9.2-p180/bin/rake"

  environment:
    PATH:         "/data/home/manish//.rvm/gems/ruby-1.9.2-p180/bin:/data/home/manish//.rvm/gems/ruby-1.9.2-p180@global/bin:/data/home/manish//.rvm/rubies/ruby-1.9.2-p180/bin:/data/home/manish//.rvm/bin:/data/home/manish/ec2-api-tools-1.4.0.2/bin:/data/data/work/java/jdk1.6.0_18/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/bin:/usr/bin:/data/home/manish//bin"
    GEM_HOME:     "/data/home/manish//.rvm/gems/ruby-1.9.2-p180"
    GEM_PATH:     "/data/home/manish//.rvm/gems/ruby-1.9.2-p180:/data/home/manish//.rvm/gems/ruby-1.9.2-p180@global"
    MY_RUBY_HOME: "/data/home/manish//.rvm/rubies/ruby-1.9.2-p180"
    IRBRC:        "/data/home/manish//.rvm/rubies/ruby-1.9.2-p180/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

Thanks for any help.
Regards,
Manish

Upvotes: 3

Views: 1044

Answers (3)

nonrectangular
nonrectangular

Reputation: 2119

I had the same problem on Ubuntu 10.04.

In the RVM install script output, it indicates which Ubuntu packages are required. For example, on my system it had:

build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev

Installing those with apt-get, 'rvm implode', and re-running 'rvm install 1.9.2' fixed the problem.

Upvotes: 0

Simon Sarris
Simon Sarris

Reputation: 63872

Do

rvm rubygems remove

Which will then say:

Removing old Rubygems files...

Installing rubygems dedicated to ruby-1.9.2-p180...

After which the gem command worked.

Edit: Nevermind, seems there's more to it.

Upvotes: 1

lintong
lintong

Reputation: 1

I had precisely the same error message when upgrading to Ubuntu 11.04 and found that I'd installed rvm whilst missing a few essential libraries.

I know that you aren't using the same flavour of Linux as me; the following worked for me and you may be able to find an equivalent:

$ sudo apt-get install build-essential ruby-full bison openssl libreadline5 libreadline5-dev curl git-core zlib1g zlib1g-dev libssl-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libmysqlclient-dev libxslt-dev libxml2-dev libcurl4-openssl-dev #install the missing libraries

$ rm -r ~/.rvm* # destroy the old rvm installation

$ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) # install rvm again

$ rvm install 1.9.2

Upvotes: 0

Related Questions