Reputation: 33
I am trying to re-install Ruby 1.9.3 on a Raspberry Pi via RVM due to a dependency error by Logstash and getting the below error. Anyone else had a similar issue:
ruby-1.9.3-p551 - #downloading ruby-1.9.3-p551, this may take a while depending on your connection...
ruby-1.9.3-p551 - #extracting ruby-1.9.3-p551 to /home/pi/.rvm/src/ruby-1.9.3-p551.....
ruby-1.9.3-p551 - #applying patch /home/pi/.rvm/patches/ruby/GH-488.patch.
ruby-1.9.3-p551 - #applying patch /home/pi/.rvm/patches/ruby/1.9.3/CVE-2015-1855-p484.patch.
ruby-1.9.3-p551 - #applying patch /home/pi/.rvm/patches/ruby/1.9.3/update-autoconf.patch.
ruby-1.9.3-p551 - #applying patch /home/pi/.rvm/patches/ruby/1.9.3/openssl3.patch.
ruby-1.9.3-p551 - #configuring..............................................
ruby-1.9.3-p551 - #post-configuration..
ruby-1.9.3-p551 - #compiling..........................................................................................................................................................................
ruby-1.9.3-p551 - #installing........................
ruby-1.9.3-p551 - #making binaries executable..
ruby-1.9.3-p551 - #downloading rubygems-3.0.3
ruby-1.9.3-p551 - #extracting rubygems-3.0.3......
ruby-1.9.3-p551 - #removing old rubygems........
ruby-1.9.3-p551 - #installing rubygems-3.0.3..
Error running 'env GEM_HOME=/home/pi/.rvm/gems/ruby-1.9.3-p551@global GEM_PATH= /home/pi/.rvm/rubies/ruby-1.9.3-p551/bin/ruby -d /home/pi/.rvm/src/rubygems-3.0.3/setup.rb --no-document',
please read /home/pi/.rvm/log/1555769993_ruby-1.9.3-p551/rubygems.install.log
Error in log file:
command(7): env GEM_HOME=/home/pi/.rvm/gems/ruby-1.9.3-p551@global GEM_PATH= /home/pi/.rvm/rubies/ruby-1.9.3-p551/bin/ruby -d /home/pi/.rvm/src/rubygems-3.0.3/setup.rb --no-document
Exception `LoadError' at /home/pi/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/rubygems.rb:1264 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at /home/pi/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/rubygems.rb:1273 - cannot load such file -- rubygems/defaults/ruby
/home/pi/.rvm/src/rubygems-3.0.3/lib/rubygems/core_ext/kernel_require.rb:54:in `require': /home/pi/.rvm/src/rubygems-3.0.3/lib/rubygems/core_ext/kernel_warn.rb:15: syntax error, unexpected tLABEL (SyntaxError)
module_function define_method(:warn) {|*messages, uplevel: nil|
^
/home/pi/.rvm/src/rubygems-3.0.3/lib/rubygems/core_ext/kernel_warn.rb:18: void value expression
/home/pi/.rvm/src/rubygems-3.0.3/lib/rubygems/core_ext/kernel_warn.rb:43: syntax error, unexpected '}', expecting keyword_end
from /home/pi/.rvm/src/rubygems-3.0.3/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/pi/.rvm/src/rubygems-3.0.3/lib/rubygems.rb:1395:in `<top (required)>'
from setup.rb:28:in `require'
from setup.rb:28:in `<main>'
Any suggestions? I am not really familiar with Ruby or RVM so any help is appreciated.
Upvotes: 3
Views: 3484
Reputation: 3000
What worked for me was downgrading to an older version of rvm.
curl -sSL https://get.rvm.io | bash -s 1.28.0
Upvotes: 0
Reputation: 31
Was running on same issue. You need to change the ruby gem version to 2.7.3 default its taking 3.0.8
It worked for me
Upvotes: 3
Reputation: 2963
Ruby 1.9.3-p551 was released in November 2014, it's possible that compatibility has been broken at this point with the latest rubygems.
Try installing older versions of rubygems, I would start with 2.4.4
because it aligns well with the release of Ruby 1.9.3 but I would also try upgrading to anything 2.X
cause one should expect support to last a few years.
The project's changelog does mention removal of compatibility code for 1.9.2.
Upvotes: 3