I’ve recently been hearing a lot about Edge Rails—the development version of Ruby on Rails— and decided that I wanted to try out all of the cool stuff that’s soon going to be at our fingertips. So, I checked out the source for Edge Rails and realized that other people probably will want to do the same. So, here’s how you do it.
First, create the folder for your application where you’ll be running your new Edge Rails application.
mkdir myapp
Next, create the vendor folder, where Edge Rails will live in this application. This is like freezing your version of Rails.
cd myapp/ mkdir vendor
Now, initialize git on your application and check out the Rails source code from Github.
git init git submodule add git://github.com/rails/rails.git vendor/rails git commit -m "Edge Rails is frozen in vendor/rails"
The nice thing that comes out of this is that your Ruby on Rails source code can be updated independent of your application. Just be aware that this also means that your Ruby on Rails source code is not self updating. You’ll have to update it yourself. Let’s get a Rails application started and then I’ll show you how to update Rails.
To initialize your new application like you do when you call rails myapp from the command line, you’ll run this from your application’s root directory.
ruby vendor/rails/railties/bin/rails .
Now start building your cool new Rails application.
Finally, to update the Rails code in your vendor/rails directory, here’s the set of commands.
cd vendor/rails git remote update git merge origin/master cd ../.. rake rails:update
Happy Coding!





Pingback: Ennuyer.net » Blog Archive » Rails Reading - August 19, 2009
Pingback: The Rubyist: August 2009 Edition