Error while installing Ruby 1.9.3

三世轮回 提交于 2019-12-03 14:40:39

问题


I have an error while installing Ruby 1.9.3 through rvm.

rvm install 1.9.3-p0
Installing Ruby from source to: /home/alder/.rvm/rubies/ruby-1.9.3-p0, this may take a while depending on your cpu(s)...

ruby-1.9.3-p0 - #fetching 
ruby-1.9.3-p0 - #downloading ruby-1.9.3-p0, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0^[[B^[[B^[[B^[[B^[[B^[[B^[100 9330k  100 9330k    0     0   112k      0  0:01:23  0:01:23 --:--:-- 64618
ruby-1.9.3-p0 - #extracting ruby-1.9.3-p0 to /home/alder/.rvm/src/ruby-1.9.3-p0
ruby-1.9.3-p0 - #extracted to /home/alder/.rvm/src/ruby-1.9.3-p0
Fetching yaml-0.1.3.tar.gz to /home/alder/.rvm/archives
Extracting yaml-0.1.3.tar.gz to /home/alder/.rvm/src
Configuring yaml in /home/alder/.rvm/src/yaml-0.1.3.
Compiling yaml in /home/alder/.rvm/src/yaml-0.1.3.
Installing yaml to /home/alder/.rvm/usr
ruby-1.9.3-p0 - #configuring 
ruby-1.9.3-p0 - #compiling 
ruby-1.9.3-p0 - #installing 
Removing old Rubygems files...
-e:1: Use RbConfig instead of obsolete and deprecated Config.
Installing rubygems dedicated to ruby-1.9.3-p0...
Installing rubygems for /home/alder/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
ERROR: Error running 'GEM_PATH="/home/alder/.rvm/gems/ruby-1.9.3-p0:/home/alder/.rvm/gems/ruby-1.9.3-p0@global:/home/alder/.rvm/gems/ruby-1.9.3-p0:/home/alder/.rvm/gems/ruby-1.9.3-p0@global" GEM_HOME="/home/alder/.rvm/gems/ruby-1.9.3-p0" "/home/alder/.rvm/rubies/ruby-1.9.3-p0/bin/ruby" "/home/alder/.rvm/src/rubygems-1.6.2/setup.rb"', please read /home/alder/.rvm/log/ruby-1.9.3-p0/rubygems.install.log             
WARN: Installation of rubygems did not complete successfully.
ruby-1.9.3-p0 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.3-p0 - #importing default gemsets (/home/alder/.rvm/gemsets/)
Install of ruby-1.9.3-p0 - #complete

Log file:

[2011-11-01 17:57:51] GEM_PATH="/home/alder/.rvm/gems/ruby-1.9.3-p0:/home/alder/.rvm/gems/ruby-1.9.3-p0@global:/home/alder/.rvm/gems/ruby-1.9.3-p0:/home/alder/.rvm/gems/ruby-1.9.3-p0@global" GEM_HOME="/home/alder/.rvm/gems/ruby-1.9.3-p0" "/home/alder/.rvm/rubies/ruby-1.9.3-p0/bin/ruby" "/home/alder/.rvm/src/rubygems-1.6.2/setup.rb"
/home/alder/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rubygems.rb:480:in `find_files': undefined method `map' for Gem::Specification:Class (NoMethodError)
    from /home/alder/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rubygems.rb:1087:in `load_plugins'
    from /home/alder/.rvm/src/rubygems-1.6.2/lib/rubygems/gem_runner.rb:84:in `<top (required)>'
    from /home/alder/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/alder/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/alder/.rvm/src/rubygems-1.6.2/setup.rb:25:in `<main>'

Before that I had successful installations of new ruby versions. I found in google such errors, but no answers of this issue. And rails server can't start.


回答1:


I had to upgrade RVM.

rvm get head
rvm reload
rvm install 1.9.3-p194
rvm use 1.9.3

If 1.9.3-p194 isn't the latest version (as of 06/07/2012), go to Ruby site to find out what is.




回答2:


I don't understand why after using gem update --system to update to RubyGems 1.8.11, the same installer error hits me and it still looks in $RVM_HOME/src/rubygems-1.6.2/

UPDATE 1: I hadn't tried rvm get latest for some time. So I tried that to alleviate my problems. This is giving me a Permission denied because it is trying to run a script under /tmp. In my /etc/fstab, /tmp is mounted as noexec. When I get this resolved, I'll see if installing Ruby 1.9.3 works any better.

UPDATE 2: Issuing mount -o remount,exec /tmp let me finally do the Ruby 1.9.3 install.



来源:https://stackoverflow.com/questions/7967723/error-while-installing-ruby-1-9-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!