Skip to content

Instantly share code, notes, and snippets.

@supermomonga
Created March 5, 2012 02:54
Show Gist options
  • Save supermomonga/1976178 to your computer and use it in GitHub Desktop.
Save supermomonga/1976178 to your computer and use it in GitHub Desktop.
rails tamplate for rails3.2
# -*- coding: utf-8 -*-
#
# Usage
#
# rails new yourapp -m https://raw.github.com/gist/1976178/82f66883dcd55321a814de3648596c3046494457/rails32template.rb -T --skip-bundle
#
git :init
append_file '.gitignore', <<-END
.rbenv-version
vendor/bundle
END
heroku = yes?('do you want to use heroku?')
twitter_bootstrap = yes?('do you want to use twitter-bootstrap?')
activeadmin = yes?('do you want to use activeadmin?')
error_page = yes?('do you want error page?')
if heroku
gem 'therubyracer-heroku', :group => :production
gem 'pg', :group => :production
gem 'heroku'
end
if twitter_bootstrap
gem 'twitter-bootstrap-rails'
end
if activeadmin
gem 'activeadmin'
end
run 'bundle install --path vendor/bundle --without production --binstubs'
git :add => '.', :commit => '-m "initial commit"'
if heroku
puts %!please modify "gem 'sqlite3' -> gem 'sqlite3', :group => [:development, :test]"!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment