Rails application generator that builds applications with the common customization stuff already done.
Latest commit 018247e Mar 29, 2017 @christiannelson christiannelson committed on GitHub Merge pull request #136 from dylnclrk/update-rails-version-in-readme
Update Rails version in README
Failed to load latest commit information.
bin Download the app protoype from github instead of embedding it. Nov 6, 2013
lib v1.0.2 Dec 31, 2015
.gitignore Ignore vagrant files. Feb 7, 2013
.ruby-gemset Migrate from .rvmrc to .ruby-version and .ruby-gemset (closes #93). Apr 12, 2013
.ruby-version Default to 2.3.1 for development. Jul 8, 2016
CHANGES.md v1.0.1 Jan 30, 2015
Gemfile Gem skeleton and inital readme notes. Sep 5, 2012
LICENSE.txt 2014 Jul 1, 2014
Rakefile Less flexible, but vastly simpler, approach to generating a new rails… Nov 29, 2012
raygun.gemspec Fixed a typo in the gemspec (pay attention to what you're doing chris… Nov 12, 2013


Gem Version


Rails application generator that builds a new project skeleton configured with Carbon Five preferences and best practices baked right in. Spend less time configuring and more building cool features.

Raygun generates Rails 5 projects by copying this sample app and massaging it gently into shape.

Alternatively, Raygun allows you to specify your own prototype instead of the default sample app. See below for details.

Major tools/libraries:

  • Rails
  • PostgreSQL
  • Slim
  • Sass
  • Bootstrap
  • RSpec
  • Factory Girl
  • SimpleCov
  • Guard (rspec, livereload)
  • And many tweaks, patterns and common recipes (see raygun-rails for all the details).

Raygun includes generator templates for controllers, views, and specs so that generated code follows best practices. For example, view generation produces bootstrap compatible markup and rspec specs use factory girl when appropriate.

Inspired by Xavier Shay work at Square and ThoughtBot's Suspenders. Thanks!

Projects Goals


  • Generates a new rails application that's ready for immediate feature development.
  • Generates an application that has best practices that apply to most projects baked in.
  • Generates an application that includes specs for all built in functionality.
  • Is a forum for discussing what should or should not be included as part of a standard stack.


$ gem install raygun


To generate an application, you only need the raygun gem and network connectivity.

To run your new application's specs or fire up its server, you'll need to meet these requirements.

  • PostgreSQL 9.x with superuser 'postgres' with no password (createuser -s postgres)
  • PhantomJS for JavaScript testing (brew install phantomjs)

The generated app will be configured to use the ruby version that was used to invoke raygun. If you're using another ruby, just change the Gemfile and .ruby-version as necessary.


$ raygun your-project

Once your project is baked out, you can easily kick the wheels. Be sure that you have the prerequities covered (see above).

$ cd your-project
$ ./bin/setup

# Run the specs, they should all pass
$ rake

# Fire up the app and open it in a browser
$ foreman start
$ open http://localhost:3000

Using a Custom Project Template

The default is to use the project at carbonfive/raygun-rails as a starting point. You can use another repo as the project template with the -p command line option.

If you invoke raygun with the -p option, you can specify your own github repository.

$ raygun -p githubid/repo your-project

The repository must:

  • Have been tagged. Raygun chooses the "greatest" tag and downloads the repository as of that tag.
  • Not have any binary files. Raygun runs a 'sed' command on all files, which will fail on binaries, such as jar files.

If your project template requires a minimum version of raygun, include the version in a file called .raygun-version at the root. Raygun will make sure it's new enough for your repo.

Internal Mechanics

Raygun fetches the greatest tag from the carbonfive/raygun-rails repo, unless it already has it cached in ~/.raygun, extracts the contents of the tarball, and runs a series of search-and-replaces on the code to customize it accordingly.

This approach is fast, simple, and makes raygun developement very easy. Make changes to the application prototype (which is a valid rails app) and tag them when they should be used for new applications.


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request


Generate an example app using your local development version of raygun:

$ ./bin/raygun tmp/example_app


View the Change Log