There’s a lot of cool stuff pooring in about what’s new in Rails Edge (which will become Rails 2.3 and/or Rails 3).
Most likely you can’t wait to get started with these new features, especially when you’re about to start a new project, which doesn’t have to be stable yet, but will be by the time 2.3/3.0 come out. This post shows you the way to create a new Rails app based on the most current Rails code, also called Edge Rails.
Let’s go…
mkdir -p myapp/vendor cd myapp git init git submodule add git://github.com/rails/rails.git vendor/rails git commit -m "Frozen Rails Edge as submodule" ruby vendor/rails/railties/bin/rails . # Add generated files to git, and code on...
First, you create a new directory for your app, including the vendor directory. Easy, right?
Next, you initialize a Git repository for your empty project. We’ll be using Git to track the remote Rails Edge code. Stay with me.
By adding a Git submodule we tell git to clone the code from git://github.com/rails/rails.git into the vendor/rails directory. Nice! If you check the current git status with git status you see git has already staged two files for you, .gitmodules and vendor/rails. Commit them now to attach the submodule to your local git repository.
Git will not automatically update your submodule, you’ll have to do that by hand. I’ll show you this in a minute.
With vendor/rails containing Rails Edge, you can now generate your Rails Edge application. In you project directory (myapp/), you call ruby vendor/rails/railties/bin/rails .. This will generate a new Rails Edge application in the current directory.
Now it’s up to you to create a fitting .gitignore file and commit the files to your repository.
That’s all, you now have a new Rails Edge application. Try ruby script/server to see it all in action. Enjoy!
Cloning your project
At some point you’ll push your myapp project to a remote git server. When you clone a fresh copy, you’ll have to initialize the git submodules. This is quite easy:
git submodule init git submodule update
Updating Rails Edge
As I said earlier, Git will not keep your submodules up-to-date for you, but will stick with the revision you added. To keep track of Rails Edge’s progress, you’ll need to update the submodule. This is done like this:
cd myapp/vendor/rails git remote update git merge origin/master
This will update your Rails Edge code. Make a commit, stating you updated the code!
After updating Rails Edge, you may want to update your rails application (like javascript files, config files etc).
rake rails:update
Good luck! And happy coding!

Or, you can use my gitools gem and have it manage it for you. :)
http://github.com/revans/gitools/tree/master
[...] Dead simple JavaScript Unit Testing in Rails (tags: javascript testing rails tdd bdd video js) How To Start A Rails Edge App The Easy Way | Ariejan.net step by step on how to clone rails edge and start a new app. Learnt a trick or two about git [...]
This is my first time attempting edge rails… after following the steps above, and then running script/server, I get this error:
***********
/home/adam/Web_Development/ghnn_web/test/vendor/rails/railties/lib/rails/commands/server.rb:6: uninitialized constant Rack::Server (NameError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’
from script/server:3
***********
also, my environment.rb file looks like this:
# Load the rails application
require File.expand_path(‘../application’, __FILE__)
# Initialize the rails application
Test.initialize!
which is different from the usual.
better to look here instead…
http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/
@Adam This post was written when Rails 2.3 was ‘edge’. Rails 3 will bring a lot of new stuff to the table and this guide probably won’t work for that quite well.
The guide you refer to by Dr. Nic is very good :) Have fun developing!
Im trying to keep a single up to date place with instructions here: http://rails3.community-tracker.com/permalinks/7/what-is-the-simplest-way-to-get-a-rails3-edge-app-started
So much has changed in the last month
[...] How To Start A Rails Edge App The Easy Way [...]