开发者

How to Run Rails 2.3.8

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 #install开发者_Go百科ed 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?


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜