开发者

Installing the RoR stack in ubuntu 10

开发者 https://www.devze.com 2023-02-07 22:35 出处:网络
Why is setting up ruby on rails in ubuntu (for a ubuntu beginner) like getting a root canal at the dentist\'s office?

Why is setting up ruby on rails in ubuntu (for a ubuntu beginner) like getting a root canal at the dentist's office?

First of all downloading ruby, rubygems and rails itself takes forever with so开发者_如何学Go many commands... Then, apparently there's already Ruby 1.8.7 in ubuntu - and when I try to install ruby 1.9.2 (for rails 3) it goes somewhere else... and rails doesn't see the new ruby...

Ugg...


Ryan Bigg has an excellent post about this using RVM. For setting up rails, you generally want to avoid installation via aptitude.

http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you


I had to (not sure if this is standard), Download rails/ruby offline and link it to my bin folder before everything was good, I also had to go remove all the old stuff ubuntu flung at me. Quite painful I wish ubuntu would just update the repositories to point to the 1.9.2.


I agree about the root canal feeling. I wrote a script that does the setup for me. You can find it here: https://github.com/sleepycat/wrong-side-of-the-tracks

Suggestions, bug fixes and improvements welcome.


$ sudo apt-get install ruby1.9.1-full rubygems1.9.1 # this is really 1.9.2 despite the confusing name
$ export PATH=/var/lib/gems/1.9.1/bin:$PATH # add this to your ~/.bashrc too
$ sudo gem1.9.1 install rails
$ rails new foo_project

enjoy.

0

精彩评论

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