Last active
August 29, 2015 14:05
-
-
Save andrewhouse/d197d01123afceeb6609 to your computer and use it in GitHub Desktop.
Template for a New Rails App
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def source_paths | |
Array(super) + | |
[File.join(File.expand_path(File.dirname(__FILE__)),'rails_root')] | |
end | |
gsub_file "Gemfile", /^gem\s+["']sqlite3["'].*$/,'' | |
gsub_file "Gemfile", /^gem\s+["']turbolinks["'].*$/,'' | |
gsub_file "Gemfile", /^gem\s+["']spring["'].*$/,'' | |
gem 'haml-rails' | |
gem 'simple_form' | |
gem 'twitter-bootstrap-rails' | |
gem 'unicorn' | |
gem_group :development do | |
gem 'quiet_assets' | |
gem 'spring' | |
gem 'sqlite3' | |
gem 'pry-byebug' | |
gem 'pry-rails' | |
gem 'erb2haml' #rake haml:replace_erbs | |
gem 'annotate' # adds reference schema comments to model | |
gem 'better_errors' # makes the error page on browser much more efficient | |
gem 'binding_of_caller' # adds a binding.pry ish session on errors in browser | |
end | |
gem_group :production do | |
gem 'pg' | |
gem 'rails_12factor' | |
end | |
run "bundle install" | |
rake "haml:replace_erbs" | |
run 'rm README.rdoc' | |
run 'touch README.md' | |
run 'rails generate bootstrap:install static' | |
run 'rails g bootstrap:layout application fluid -f' | |
run 'rails generate simple_form:install --bootstrap' | |
gsub_file('app/views/layouts/application.html.haml', /\, \'data-turbolinks-track\' => true/, '') | |
gsub_file('app/assets/javascripts/application.js', /\= require turbolinks/, '') | |
inside 'config' do | |
copy_file 'unicorn.rb' | |
end | |
inside '.' do | |
copy_file 'Procfile' | |
end | |
git :init | |
git add: "." | |
git commit: %Q{ -m 'Initial commit' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment