Installing Rails on a fresh system

Posted Almost 13 years ago. Visible to the public.
  1. Install Ruby from the Ubuntu repository: sudo apt-get install ruby ruby-dev \
    ruby is the meta package. If you want to explicitly install 1.8 or 1.9, install ruby1.8 or ruby1.9 instead (the same applies for ruby-dev).
  2. Do not install RubyGems from the repository but install the version from the webpage instead.
  3. Get Bundler: sudo gem install bundler

Rails and other gems for a project should now be installed via bundle install from the project directory. If you need Rails and don't have a Gemfile you can do it old-school: sudo gem install rails -v=2.3.12.

You will also need Ubuntu development packages for MySQL, RMagick, etc. The bundle install call will otherwise fail for such projects.

Last edit
About 7 years ago
License
Source code in this card is licensed under the MIT License.
Posted by Kim Klotz to makandra dev (2011-07-14 09:43)