31

I have downloaded Lion and looking to install Ruby on Rails I have been scanning the web for a way to do this but can't seem to find a easy way, could anyone point me in the correct direction.

Help Much Appreciated

Thanks

Jack Eccleshall
  • 615
  • 2
  • 10
  • 19
  • 1
    See this thread, http://stackoverflow.com/questions/6765098/is-rails-still-included-by-default-in-a-clean-installation-of-mac-os-x-10-7-aka – Snips Aug 03 '11 at 19:38
  • At this time (April 2014), Mac OS X Mavericks (10.9) is the current version, as is Ruby 2.1.1 and Rails 4.1. This article [Install Ruby on Rails - Mac OS X Mavericks](http://railsapps.github.io/installrubyonrails-mac.html) provides up-to-date installation instructions. – Daniel Kehoe Apr 21 '14 at 23:44

3 Answers3

47

Below I try to resume my rails installation. It should work well.

1) Download Xcode from Apple Application Store :

use this link : xcode

2) Install xcode :

Use finder=>applications to locate "Xcode installation icon and double-click on it to begin the installation

**2b.) For xcode 4.3. After installing xcode, launch it, navigate to Xcode->Preferences, Downloads tab. Install Command Line Tools. This will download and install C, compiler, loader and other command line utilities needed to compile & build the Ruby packages.

3) use a terminal to install git:

gem install git

and put this line in your .bash_profile (create one if none exists) :

export PATH=$PATH:/usr/local/git/bin/

4) use a terminal to install rvm:

bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )

and run this command to update your .bash_profile :

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile

5) use a terminal to install ruby 1.9.2 and rails:

rvm autolibs enable 
rvm install 1.9.2
rvm --default 1.9.2
gem update
gem install rails
Community
  • 1
  • 1
Alain Beauvois
  • 5,896
  • 3
  • 44
  • 26
  • 1
    I want to install Ruby 1.9.2, because there is a problem with OpenSSL in Ruby 1.9.3. I'm on OS X 10.7.3 and have Xcode 4.3.0. However Xcode 4.2+ is only supported by Ruby 1.9.3. http://www.christopherirish.com/2011/09/02/ruby-1-9-2-segmentation-fault-and-openssl/ – neoneye Feb 22 '12 at 11:20
  • by the way, just a trivial reminder, but don't forget to source your .bash_profile after adding those lines to your profile by doing '. ~/.bash_profile' ... and also, in step 3, for convenience sakes, you may have to do 'sudo gem install git' and also 'echo "export PATH=$PATH:/usr/local/git/bin/" >> ~/.bash_profile' in the terminal – David T. Jun 28 '12 at 08:42
5

As of the latest version of lion (and having installed sass/compass/haml), if you type "rails" in the terminal and you dont have it, it will tell you to just do a sudo install right there. Hope its as easy for you as it was for me.

3

Personally I have follow this link to install rails with rvm on Mac OS X Lion and I use pow to run locally my application.

Idris
  • 997
  • 2
  • 10
  • 27
Awea
  • 3,163
  • 8
  • 40
  • 59