Skip to content

Instantly share code, notes, and snippets.

@tomoyukiinoue
Created July 1, 2013 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tomoyukiinoue/5900766 to your computer and use it in GitHub Desktop.
Save tomoyukiinoue/5900766 to your computer and use it in GitHub Desktop.
Setup Rails 4.0 + Ruby 2.0 to Mac OS X 10.8
$ brew upgrade rbenv
$ rbenv -v
rbenv 0.4.0
$ brew upgrade ruby-build
$ ruby-build --version
ruby-build 20130628
$ rbenv install --list | grep 2.0.0-p
2.0.0-p0
2.0.0-p195
2.0.0-p247
2.0.0-preview1
2.0.0-preview2
$ rbenv install 2.0.0-p247
$ rbenv versions
system
* 1.9.3-p194 (set by /Users/inoue/.rbenv/version)
2.0.0-p247
$ rbenv global 2.0.0-p247
$ rbenv rehash
$ rbenv version
2.0.0-p247 (set by /Users/inoue/.rbenv/version)
$ gem -v
2.0.3
### https://github.com/rdoc/rdoc/issues/190
$ gem install rdoc
Fetching: rdoc-4.0.1.gem (100%)
rdoc's executable "rdoc" conflicts with /Users/inoue/.rbenv/versions/2.0.0-p247/bin/rdoc
Overwrite the executable? [yN] y
rdoc's executable "ri" conflicts with /Users/inoue/.rbenv/versions/2.0.0-p247/bin/ri
Overwrite the executable? [yN] y
...
Successfully installed rdoc-4.0.1
Parsing documentation for rdoc-4.0.1
Installing ri documentation for rdoc-4.0.1
1 gem installed
$ rbenv rehash
$ gem install rails
...
28 gems installed
$ rbenv rehash
$ rails -v
Rails 4.0.0
$ rails new myapp
$ cd myapp/
myapp $ rails s
=> Booting WEBrick
=> Rails 4.0.0 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2013-07-01 22:28:14] INFO WEBrick 1.3.1
[2013-07-01 22:28:14] INFO ruby 2.0.0 (2013-06-27) [x86_64-darwin12.4.0]
[2013-07-01 22:28:14] INFO WEBrick::HTTPServer#start: pid=46016 port=3000
### Access http://localhost:3000 on your browser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment