Created
October 14, 2012 04:08
-
-
Save tomoyukiinoue/3887261 to your computer and use it in GitHub Desktop.
Install Rails 3.2.8 for Mac OS X Mountain Lion (10.8.2)
This file contains 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
1. Install Xcode 4.5.1 from AppStore. | |
1. Install Command Line Tools via Xcode preferences. |
This file contains 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
$ ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)" | |
$ brew doctor | |
Your system is raring to brew. |
This file contains 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
$ brew install rbenv |
This file contains 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
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi |
This file contains 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
$ source ~/.bash_profile |
This file contains 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
$ brew install ruby-build | |
$ rbenv install -l | |
Available versions: | |
1.8.6-p383 | |
1.8.6-p420 | |
1.8.7-p249 | |
1.8.7-p302 | |
... | |
1.9.3-p0 | |
1.9.3-p125 | |
1.9.3-p194 | |
1.9.3-preview1 | |
… |
This file contains 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
$ rbenv install 1.9.3-p194 | |
$ rbenv versions | |
1.9.3p194 | |
$ rbenv global 1.9.3-p194 | |
$ rbenv rehash | |
$ ruby -v | |
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.2.0] | |
$ which ruby | |
/Users/inoue/.rbenv/shims/ruby |
This file contains 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
$ gem install rails | |
$ source ~/.bash_profile | |
$ rails -v | |
Rails 3.2.8 |
This file contains 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
$ rails new helloworld | |
$ cd helloworld/ | |
$ rails s | |
=> Booting WEBrick | |
=> Rails 3.2.8 application starting in development on http://0.0.0.0:3000 | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
[2012-10-14 12:51:43] INFO WEBrick 1.3.1 | |
[2012-10-14 12:51:43] INFO ruby 1.9.3 (2012-04-20) [x86_64-darwin12.2.0] | |
[2012-10-14 12:51:43] INFO WEBrick::HTTPServer#start: pid=28949 port=3000 |
@Soulkey, executing:
eval "$(rbenv init -)"
after this step:
rbenv global 1.9.3-p194
is working for me, see here for details https://github.com/sstephenson/rbenv#homebrew-on-mac-os-x
add it to bash profile to make it persist
$ echo 'eval "$(rbenv init -)"' >> $HOME/.bash_profile
$ source ~/.bash_profile
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It didn't happen for me, still 1.8.7. Thank you though.