views:

141

answers:

1

Currently when I want to create a Rails application using edge I first just run...

rails appname

Then I...

rake rails:freeze:edge

Then I delete all of the folders but the vendor folder which contains the frozen edge. Once that's done I run (from the root of the site)...

ruby vendor/rails/railties/bin/rails .

I do it this way right now because I want to take advantage of the new rails templates, the new application_controller.rb file name and what not (which I couldn't if I just used the previous generated app and the frozen edge).

Is there a better way? How does everyone else use edge? Can I install edge as a gem? Is there a convienant way to have just one copy of edge on the computer and use that to generate new apps using just the rails command?

+3  A: 

Get edge rails by using git (clone to repository to your local hdd). Then, simply add the bin dir of the cloned rails git repository to your PATH in front of the gem path, so the rails command from the repo takes precedence and is executed when creating a new rails app.

e.g. if you cloned the rails.git repo into /home/foo/rails, just add export PATH=/home/foo/rails/railties/bin:$PATH to your ~/.bashrc. To create a new rails app, you just run rails myapp and symlink vendor/rails to your cloned edge rails repo so that you only need to have one copy: ln -s /home/foo/rails .../myapp/vendor/rails

This way, you can easily work on a branch of the rails core itself and local apps can be developed/tested with latest edge rails.

Andreas
awesome - that seems like exactly what I was after... seems though I've got some weirdness going on with my path... have to look into that. Thanks Andreas.
Tim K.