How to install Ruby on Rails 3.0 on Ubuntu 10.10?

后端 未结 8 1352
北海茫月
北海茫月 2020-12-24 04:18

After installing Ruby and Ruby Gems:

$ sudo apt-get install ruby rubygems
...
$ ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux]
$ gem -v
1.3.7


        
相关标签:
8条回答
  • 2020-12-24 04:44

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

    Under no circumstance should you install Ruby, Rubygems or any Ruby-related packages from apt-get. This system is out-dated and leads to major headaches. Avoid it for Ruby-related packages.

    0 讨论(0)
  • 2020-12-24 04:45

    The Debian version of RubyGems installs Gems into /var/lib/gems/1.8/ and Gem binaries into /var/lib/gems/1.8/bin. You need to make sure that directory is in your $PATH.

    This is a typical example of what I call the "If you hear hooves, think horses, not zebras" rule. If a computer tells you it cannot find something, the first thing to look for, is if that something is actually there, the second thing is whether the computer is looking in the right place. Installing libreadline5-dev OTOH is pretty far down the end of the list …

    In this case, you are telling the computer to execute the file rails in the $PATH, which simply doesn't exist, because the directory it was installed into is not in the $PATH.

    0 讨论(0)
提交回复
热议问题