Last active
October 7, 2015 01:48
-
-
Save scottweisman/3085958 to your computer and use it in GitHub Desktop.
New Rails App Setup
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
rails new <project name> -d postgresql --skip-bundle --skip-test-unit | |
remove turbolinks | |
1. Remove the gem 'turbolinks' line from your Gemfile. | |
2. Remove the //= require turbolinks from your app/assets/javascripts/application.js. | |
3. Remove the two "data-turbolinks-track" => true hash key/value pairs from your app/views/layouts/application.html.erb. | |
git init | |
#.gemfile | |
source 'https://rubygems.org' | |
ruby "2.1.1" | |
# Rails Default | |
gem 'rails', '4.1.0' | |
gem 'pg' | |
gem 'sass-rails', '~> 4.0.3' | |
gem 'uglifier', '>= 1.3.0' | |
gem 'coffee-rails', '~> 4.0.0' | |
gem 'jquery-rails' | |
gem 'jbuilder', '~> 2.0' | |
gem 'sdoc', '~> 0.4.0', group: :doc, require: false | |
# Our Gems | |
gem 'foreman' | |
gem 'figaro' | |
gem 'newrelic_rpm' | |
gem "devise", "~> 3.2.4" | |
gem 'bourbon' | |
gem 'neat' | |
gem 'bitters' | |
group :production, :staging do | |
gem 'rails_12factor' | |
end | |
group :development do | |
gem 'quiet_assets' | |
gem 'faker' | |
gem 'better_errors' | |
gem 'binding_of_caller' | |
gem 'spring' | |
end | |
group :development, :test do | |
gem 'rspec-rails', '~> 3.0.0' | |
gem 'factory_girl_rails' | |
gem 'capybara', '~> 2.3.0' | |
gem 'database_cleaner' | |
end | |
bundle | |
#database.yml | |
development: | |
adapter: postgresql | |
database: app-name | |
encoding: utf8 | |
template: template0 | |
host: localhost | |
test: | |
adapter: postgresql | |
database: app-name_test | |
encoding: utf8 | |
template: template0 | |
host: localhost | |
rails g rspec:install | |
#config/application.rb | |
config.generators do |g| | |
g.test_framework :rspec, | |
fixtures: true, | |
view_specs: false, | |
helper_specs: false, | |
controller_specs: false, | |
routing_specs: false | |
g.factory_girl true | |
end | |
config.assets.initialize_on_precompile = false | |
#application.css | |
Change extension: application.css.scss | |
Delete manifest comments | |
@import "bootstrap"; | |
bundle exec rake db:create:all | |
Setup github repo | |
git remote add origin http://github.com/UserName/app-name.git | |
Setup Heroku | |
heroku create | |
git push heroku master | |
heroku run rake db:migrate | |
heroku apps:rename newname | |
Add team members as collaborators from Heroku Dashboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment