Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Application generator for Rails3
branch: master

This branch is 38 commits behind leshill:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Rails 3, RSpec, Factory Girl, Haml, and jQuery

Easily generate a Rails 3 application with RSpec, Factory Girl, Haml, and jQuery in one line:

% rails my_app -J -T -m \


We love rvm, so the application has an .rvmrc generated to specify a gemset.


This also gives you the Factory Girl and Haml Rails 3 generators — the generators for RSpec are in the RSpec gem — so that your factories and views are generated using Factory Girl and Haml, and that all your generated tests are specs. These generators are from the rails3_generators gem, we pulled them out to avoid all the other dependencies included in that gem.

JavaScript Includes

Since the Rails helper javascript_include_tag :defaults is looking for Prototype, we used this to add a new JavaScript expansion to pull in the jQuery libraries. Use it like so:

= javascript_include_tag :jquery


We love git, so the application has a git repo initialized with all the initial changes staged.

Wrap Up

After the application has been generated, there are a few clean up commands to run:

% cd my_app
% gem install bundler
% bundle install
% bundle lock
% script/rails generate rspec:install

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don’t break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.
Something went wrong with that request. Please try again.