Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Ruby on Rails - Mac OS Lion

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

like image 588
Jack Eccleshall Avatar asked Jul 27 '11 07:07

Jack Eccleshall


People also ask

How do I install Ruby on Mac Catalina?

Installing Ruby on macOS Monterey (the latest macOS) or Catalina (an earlier macOS) is the same. You will install Ruby using the Terminal application. There's no need to download and compile from source. Instead, prepare your computer, install Homebrew, install an (optional) version manager, and install Ruby.


3 Answers

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
like image 93
Alain Beauvois Avatar answered Oct 09 '22 11:10

Alain Beauvois


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.

like image 5
Jeff Scott Ward Avatar answered Oct 09 '22 11:10

Jeff Scott Ward


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.

like image 3
Awea Avatar answered Oct 09 '22 13:10

Awea