Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I got a present: older Rails tutorials that needs old ruby version. I try to install ruby-1.8 with the packet manager. I still got problems with the tutorial example code. Next I try rvm to install the old ruby version. Unfortunately I got an error. I do not know what to do. I search the internet. Many people got no problems with rvm. rvm use

*ERROR: Branch origin/ruby_1_8_4 not found.*

and

*ERROR: Error running 'GEM_PATH="/usr/share/ruby-rvm/gems/ruby-1.8.4-
  tv1_8_4:/usr/share/ruby-rvm/gems/ruby-1.8.4-tv1_8_4@global:/usr/share/ruby-
  rvm/gems/ruby-1.8.4-tv1_8_4:/usr/share/ruby-rvm/gems/ruby-1.8.4-tv1_8_4@global"     
  GEM_HOME="/usr/share/ruby-rvm/gems/ruby-1.8.4-tv1_8_4" "/usr/share/ruby-
  rvm/rubies/ruby-1.8.4-tv1_8_4/bin/ruby" "/usr/share/ruby-rvm/src/rubygems-
  1.3.7/setup.rb"', please read /usr/share/ruby-rvm/log/ruby-1.8.4-
  tv1_8_4/rubygems.install.log*

Please give me a hint.

share|improve this question

1 Answer 1

After the installation, try the following command ( if you have installed more than one Ruby edition ) and choose the appropriate version.

Or try the alternate ppa repository to install Ruby

$ add-apt-repository ppa:brightbox/ruby-ng-experimental
$ aptitude update
$ aptitude install <select-the-version-from-repository>
$ update-alternatives --config ruby
$ update-alternatives --config gem
share|improve this answer
    
Thanks for your help, Mr. Oğuz Çelikdemir...I need a solution with rvm, because I got different rails tutorials with different ruby versions. I think the problem occurs because I installed ruby with synaptic. rvm should not know the existence of the ruby interpreters which I installed with the packet manager synaptic. I de-install rails and ruby and re-install it with rvm. –  Codestudent Oct 31 '12 at 18:49
    
Dear friend, last two commands specifically designed for more than installation which you can select what version you want. The command will show you a list available Ruby versions with a number. When you enter a number, the system will recognize this version as a default! Just try and let me know the result. –  Oğuz Çelikdemir Oct 31 '12 at 19:30
    
Thanks for your concern. You are right. update-alternatives is indeed a solution. But I need rvm, because rvm allows you to set ruby versions for your system-wide and for singular projects within a configuration files. –  Codestudent Oct 31 '12 at 20:11
    
Thanks for your concern...Your hints works for me. But I am still a little unhappy, because I want to set the ruby version in a project configuration file. RVM got this possibility with rvmrc, you can set ruby interpreters system-wide and project-only. I use scaffold to generate a rails project. Where should I put the update-alternatives lines to set the ruby versions only for a project. The command rvm list known shows me that ruby 1.8.4 is not among the known list, so you are right from the start. I spend 30 minutes with the rvm manual to see it. –  Codestudent Oct 31 '12 at 21:24
    
try this link [Ubuntu 12.04 RVM Installation]{andrehonsberg.com/article/…} –  Oğuz Çelikdemir Nov 1 '12 at 7:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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