RubyFoo/Rails: Difference between revisions

From Chaosdorf Wiki
 
Line 7: Line 7:
* Arch: ruby
* Arch: ruby
* OS X: [http://mxcl.github.com/homebrew/ brew] install ruby
* OS X: [http://mxcl.github.com/homebrew/ brew] install ruby
* FreeBSD: lang/ruby19
* etc.
* etc.



Latest revision as of 10:32, 24 October 2012

Ruby on Rails Installation[edit | edit source]

Install Ruby[edit | edit source]

Use a recent Ruby version. Recent is 1.9.3 atm.

  • Debian: ruby1.9.3 (testing repo)
  • Arch: ruby
  • OS X: brew install ruby
  • FreeBSD: lang/ruby19
  • etc.

Set Environment Variables[edit | edit source]

Set a user specific gems dir (because of reasons) and the search path:

 $ mkdir $HOME/.gem
 $ export GEM_HOME=$HOME/.gem
 $ export PATH=$PATH:$HOME/.gem/bin

Remember to make these persistent!

Install Bundler Gem[edit | edit source]

Use the Bundler gem to manage dependencies for each project:

 $ gem install bundler

Go to the project directory and install specified gems:

 $ cd [PROJECT]
 $ bundle

Or, initialize a new Rails installation with the most recent version:

 $ gem install rails
 $ rails new [PROJECT]