0

I have been working on installing Rails. However, I am ending up with 2.2.3 and I need 2.3.8.

What I did was I installed ruby via:

apt-get install ruby build-essential #installed 1.8.7

apt-get install rubygems #installed 1.3.6

gem install rails-v2.3.8

I tried to run this but it didn't work. Ubuntu didn't know the command, 'rails' in rails new blog.

I tried to remedy this by installing rails, not via gem but by apt-get:

apt-get install rails

The version installed was rails 2.2.3

What should I be doing to install Rails 2.3.8?

1
  • if this is a development machine, take a look at rvm. The problems you experienced will be taken care of for you. And much more. Feb 14, 2011 at 8:07

2 Answers 2

1

gem install rails -v 2.3.8 should do it. Rails 2 makes a project like "rails name_of_project", without the new keyword. Do a "gem list" to check whether Rails 2.3.8 is installed. If it is, it may be that rails is not in your path.

Edit:

I think that it would work if you add "export PATH=/var/lib/gems/1.8/bin:$PATH" to your ~/.bashrc. I can't really verify because i work on mac os, but i think it would. Else, try to execute a "find / -name "rails" to locate it and add that to your path.

3
  • how do I add rais in my path. I have rails 2.3.8 in the gem list.
    – Teej
    Feb 14, 2011 at 3:39
  • I think that it would work if you add "export PATH=/var/lib/gems/1.8/bin:$PATH" to your ~/.bashrc. I can't really verify because i work on mac os, but i think it would. Else, try to execute a "find -name / "rails" to locate it and add that to your path.
    – Spyros
    Feb 14, 2011 at 3:47
  • I hope you don't mind me modifying your answer. I just added your comment above.
    – Teej
    Feb 14, 2011 at 4:07
1

You can install Ruby Version Manager and change version what you want.

1
  • +1 I had a problem with ubuntu and reinstalled. I'm now using rvm and am very very much happier
    – Teej
    Feb 18, 2011 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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