Update from 7.10 to 8.04 breaks ruby install

Asked by tjp

after updating distro from gutsy to hardy, my ruby install will no longer run rake...

I have looked around and it seems that everyone is saying to make sure rspec is installed, but in addition to rake being broken, gem install is no longer functional no is the apt-get install...

any help would be sincerely appreciated...

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Matt Darcy (matt-darcy) said :
#1

could you provide more information saying "ruby is broke" does not really give any information on where to look and what to advise you what to do.

What are you trying to do ?
What is the error message you get ?
What have you tried ?

Revision history for this message
tjp (tpletcher-source-e) said :
#2

sorry was in a rush yesterday when posting...specifically,

I'm trying to run rake after a new checkout from my git repository.

Rake fails with the following message (note trace):

tpletcher@tjp-laptop:~/app$ rake db:migrate --trace
(in /home/tpletcher/app)
rake aborted!
no such file to load -- spec/rake/spectask
/home/tpletcher/app/lib/tasks/selenium.rake:2:in `require'
/home/tpletcher/app/lib/tasks/selenium.rake:2
/usr/lib/ruby/1.8/rake.rb:1737:in `in_namespace'
/usr/lib/ruby/1.8/rake.rb:821:in `namespace'
/home/tpletcher/app/lib/tasks/selenium.rake:1
/home/tpletcher/app/vendor/rails/railties/lib/tasks/rails.rb:7:in `load'
/home/tpletcher/app/vendor/rails/railties/lib/tasks/rails.rb:7
/home/tpletcher/app/vendor/rails/railties/lib/tasks/rails.rb:7:in `each'
/home/tpletcher/app/vendor/rails/railties/lib/tasks/rails.rb:7
/home/tpletcher/app/Rakefile:10:in `require'
/home/tpletcher/app/Rakefile:10
/usr/lib/ruby/1.8/rake.rb:2149:in `load'
/usr/lib/ruby/1.8/rake.rb:2149:in `raw_load_rakefile'
/usr/lib/ruby/1.8/rake.rb:1897:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1896:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:1880:in `run'
/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1878:in `run'
/usr/bin/rake:28

Note that this command ran without issue prior to my upgrade to 8.x

I have searched around and seen other people with same issue have found that rspec needs to be in place and this corrects the issue.

A try at installing via apt-get results in this:

tpletcher@tjp-laptop:~/app$ sudo apt-get install rspec
[sudo] password for tpletcher:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package rspec

Atry at installing via gems results in this:

tpletcher@tjp-laptop:~/app$ sudo gem install rspec
/usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)

Revision history for this message
datatec (datatec) said :
#3

I believe this problem you are having is actually due to the fixing of the Opens SSL Keys done by the upgrade system

http://www.securityfocus.com/brief/739
"A flaw in the way that OpenSSL is implemented in the Ubuntu and Debian distributions of Linux have earned the software an unenviable adjective in the world of encryption: Predictable.
On Tuesday, the team behind the popular Ubuntu distribution of Linux announced that it had issued a patch to fix a flaw inadvertently added to the OpenSSL code which dramatically reduced the number of possible keys generated by the software. While the flaw is in OpenSSL, the same code is used to generate keys for a number of other popular programs, including OpenSSH, OpenVPN and SSL certificates...."

I am on the latest patches of 7 (haven't had time to do the upgrade to 8 yet) and my system also broke with the same "uninitialized constant Gem::GemRunner (NameError)" message.

I did some hunting on google and discovered that ruby/irb etc depend on OpenSSL. and someone mentioned that if these keys change there might be issues.

Unfortunatly I am still quite new to Linux and Ruby and don't know how to resolve this issue.
:(

If anyone has any idea how to fix this please post it here.

Hmm, I am now guessing that the key I generated to be part of the Ubuntu community is also now predictible and needs to be regenereated. I wonder how to do that also.

If anyone has any info thanks.

Revision history for this message
datatec (datatec) said :
#4

I believe this problem you are having is actually due to the fixing of the Opens SSL Keys done by the upgrade system

http://www.securityfocus.com/brief/739
"A flaw in the way that OpenSSL is implemented in the Ubuntu and Debian distributions of Linux have earned the software an unenviable adjective in the world of encryption: Predictable.
On Tuesday, the team behind the popular Ubuntu distribution of Linux announced that it had issued a patch to fix a flaw inadvertently added to the OpenSSL code which dramatically reduced the number of possible keys generated by the software. While the flaw is in OpenSSL, the same code is used to generate keys for a number of other popular programs, including OpenSSH, OpenVPN and SSL certificates...."

I am on the latest patches of 7 (haven't had time to do the upgrade to 8 yet) and my system also broke with the same "uninitialized constant Gem::GemRunner (NameError)" message.

I did some hunting on google and discovered that ruby/irb etc depend on OpenSSL. and someone mentioned that if these keys change there might be issues.

Unfortunatly I am still quite new to Linux and Ruby and don't know how to resolve this issue.
:(

If anyone has any idea how to fix this please post it here.

Hmm, I am now guessing that the key I generated to be part of the Ubuntu community is also now predictible and needs to be regenereated. I wonder how to do that also.

If anyone has any info thanks.

Revision history for this message
datatec (datatec) said :
#5

It appears this actually happened (at least in my case) because around the same time I updated installed the OpenSSL update I did a system install to the newer 1.1.0 gems using running “gem update—system”. Thinking back, after getting the system fixed I do remember something about the system saying to the effect of "If `gem` was installed by a previous RubyGems installation, you may need to remove it by hand." I didn't understand and thus didn't do it.

To fix the issue here is the procedure I followed.

From terminal

ls -la `which ruby`
result 1.8 (tells what version of ruby running)

`which gem`
result pointed to old gem in \usr\bin\gem (should have pointed at 1.8 if correct)

sudo rm `which gem`
result removed old gem

next followed the commands from
https://help.ubuntu.com/community/RubyOnRails
result, builds gems from source ( I used the 1.1.0 given in the example)

Some more info on the issue.

http://blog.ra66i.org/archives/informatics/2007/12/23/a-quick-gem-101-faq-gemrunner-name-error/

http://www.nickpeters.net/2007/12/31/fix-for-uninitialized-constant-gemgemrunner-nameerror/

http://vanderkussen.org/articles/2008/02/12/uninitialized-constant-gem-gemrunner
(can just add the line back in to gem if want to use old one)

Can you help with this problem?

Provide an answer of your own, or ask tjp for more information if necessary.

To post a message you must log in.