Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Steven H. Allen & Co.'s ( rails template
# Steven H. Allen & Co. (
# NOTICE: This template uses Postgresql exclusively for now
# To use this template:
# $ rails new <rails_app_name> -m -S -T -d postgresql
# Install gems
gem "haml"
gem_group :development do
gem "better_errors"
gem_group :development, :test do
gem "database_cleaner"
gem "factory_girl_rails"
gem "jazz_hands"
gem "rspec-rails"
gem "shoulda"
gem "valid_attribute"
run "rvm gemset create #{app_name}"
run "rvm gemset use #{app_name}"
run "bundle install"
# Create .rspec defaults
file '.rspec', <<-CODE
# Create database user
run "createuser -d #{app_name}"
# Create database
rake "db:create:all"
rake "db:migrate"
# Run the Rails Generator on whatever
generate "rspec:install"
# Add syntactic goodness to spec_helper (via Mark M)
inject_into_file "spec/spec_helper.rb", :after => 'config.order = "random"' do <<-CODE
config.include FactoryGirl::Syntax::Methods
# Clean everything up that we don't need before we check-in
remove_file 'public/index.html'
git :init
git :add => "."
git :commit => "-a -m 'Initial'"
Copy link

cgrusden commented Jun 14, 2013

Template system was adding an extra 'gem "pg"' to the Gemfile. Template system does not check if the gem exists already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment