Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 415
Dru Avatar asked Sep 08 '12 19:09

Dru


People also ask

How do I run a Rails project?

Go to your browser and open http://localhost:3000, you will see a basic Rails app running. You can also use the alias "s" to start the server: bin/rails s . The server can be run on a different port using the -p option. The default development environment can be changed using -e .


1 Answers

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.

like image 168
sunkencity Avatar answered Sep 28 '22 08:09

sunkencity