Dru Dru - 1 month ago 7
Ruby Question

How to create a rails project using rails/master (beta 4.0.0)?

How can I create a rails project using rails/master?

rails new app_name --edge
uses Rails 3.2.8 and points to the '3-2-stable' branch in the Gemfile.

Creating a rails project, pointing
gem 'rails'
to master and running
bundle
or
bundle install
generates several errors. I am also weary of this approach because the
rails new
command for each version can vary.

Answer Source

Just download the head from github and run it from there:

$ gem update bundler #unless you've got 1.2 already

$ git clone https://github.com/rails/rails.git
$ ruby rails/railties/bin/rails new fooapp --dev
$ rails -v
Rails 4.0.0.beta

Or for more recent versions of rails, use the exe directory instead:

$ ruby rails/railties/exe/rails new fooapp --dev

It's also worth noting that the --dev will generate a Gemfile pointing to your local copy of Rails. If you instead want it to point at the current copy on github use --edge.