Created
January 11, 2012 02:36
-
-
Save mikeymicrophone/1592638 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Here's some great instructions: | |
| http://www.frederico-araujo.com/2011/07/30/installing-rails-on-os-x-lion-with-homebrew-rvm-and-mysql/ | |
| Here's my version: | |
| First, install XCode, which will help you compile other software. If you have OSX 10.7 (Lion), you can install XCode via the Mac App Store. You can also register (for free) at developer.apple.com and get it from the downloads section of the iOS dev center. | |
| The newest version of XCode has a compiler called LLVM which apparently does not work with RVM's 1.9.2 installer. Use this tool to install the compiler called GCC. | |
| https://github.com/kennethreitz/osx-gcc-installer | |
| Next, install Git. Go to http://git-scm.com and choose your platform from the right side of the home page. Choose the newest version. Download and run the installer. | |
| Your mac already has Ruby 1.8 installed. This will probably be sufficient for what we're doing. However, Ruby 1.9 is faster and has a few differences that are important, so I recommend that you use RVM to install 1.9. | |
| As the instructions at http://rvm.beginrescueend.com state, you can install RVM by pasting this line into a Terminal: | |
| bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) | |
| (note that this should be a Terminal window you opened after Git was finished installing). | |
| Add this line to ~/.bash_profile (which you should create if it doesn't exist yet): | |
| if [[ -s /Users/mschwab/.rvm/scripts/rvm ]] ; then source /Users/mschwab/.rvm/scripts/rvm ; fi | |
| (replace mschwab with the name of your home directory) | |
| Then open a new terminal and run these two commands: | |
| rvm install 1.9.2 | |
| rvm --default use 1.9.2 | |
| Installing MySQL is optional, since you can use Sqlite for most database stuff most of the time. There are several ways to install MySQL, including the increasingly-popular homebrew. The last time I tried homebrew it didn't work, so here are the simpler instructions: | |
| Go to http://www.mysql.com/downloads/mysql/ and download the DMG version of the latest MySQL for 64-bit computers. Right now it's 5.5.20: | |
| http://www.mysql.com/downloads/mirror.php?id=405712#mirrors | |
| Run the MySQL installer, the startup item installer, and double click on the prefpane. | |
| Then run this command in a terminal: | |
| sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib | |
| And then this one: | |
| gem install mysql2 |
Author
Author
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if [[ -s /Users/mschwab/.rvm/scripts/rvm ]] ; then source /Users/mschwab/.rvm/scripts/rvm ; fi