Isolated Rails 3: Easy Mode

Steven Baker showed us how to bootstrap Rails 3 with Isolate. Just so you have no excuses, stick this script somewhere in your path:

mkdir $*
cd $*
echo "gem 'rails'\ngem 'sqlite3-ruby'" > Isolate
echo "require 'isolate/now'\nrequire 'isolate/rake'" > bootstrap
rake -f bootstrap isolate:sh['rails new . --skip-gemfile']
sed -i '' '/Bundler/d' config/application.rb
sed -i '' '/gemfile =/,$d' config/boot.rb
echo "require 'isolate/now'" >> config/boot.rb

Now you never have to generate a Rails app without Isolate again.