Mate Driven Development

Web Dev over open technologies

Installing Rails Edge (4.0.0.beta)

| Comments

These are the steps I had to follow to get Rails Edge (4.0.0.beta at the moment of writing) in my Ubuntu 12.10 box.

Create a new gemset

1
2
3
$ mkdir rails_edge && cd rails_edge
/rails_edge$ echo 'rvm gemset use rails_edge --create' > .rvmrc
/rails_edge$ cd .. && cd rails_edge

At this point rvm is going to ask you if you trust the .rvmrc file, just say yes

Clone Rails

1
/rails_edge$ git clone https://github.com/rails/rails.git

Install required gems

1
/rails_edge$ gem install i18n thor

Create a dummy Rails app

1
 /rails_edge$ ruby rails/railties/bin/rails new dummy_app --edge --skip-bundle && rm -rf rails/

Extract the generated Gemfile

1
 /rails_edge$ mv dummy_app/Gemfile . && rm -rf dummy_app/

Install Rails Edge

1
2
3
 /rails_edge$ bundle install --binstubs
 /rails_edge$ rails -v
 Rails 4.0.0.beta

Install a JavaScript runtime:

NOTE: This step is the only one that’s specific to Ubuntu

In this case we are going to install node.js

1
2
3
4
/rails_edge$ sudo apt-get install python-software-properties
/rails_edge$ sudo add-apt-repository ppa:chris-lea/node.js
/rails_edge$ sudo apt-get update
/rails_edge$ sudo apt-get install nodejs npm

Create a Rails Edge app

1
2
3
4
5
6
7
8
9
10
 /rails_edge$ rails new rails_4_app --edge --skip-bundle && cd rails_4_app/
 /rails_edge/rails_4_app$ bundle install --binstubs
 /rails_edge/rails_4_app$ rails s
=> Booting WEBrick
=> Rails 4.0.0.beta application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-12-05 13:58:18] INFO  WEBrick 1.3.1
[2012-12-05 13:58:18] INFO  ruby 1.9.3 (2012-11-10) [i686-linux]
[2012-12-05 13:58:18] INFO  WEBrick::HTTPServer#start: pid=32414 port=3000

And you should be Riding Rails 4.0.0.beta by now.

Comments