Skip to content

Instantly share code, notes, and snippets.

@stevecass
Last active November 20, 2019 00:56
Show Gist options
  • Save stevecass/5eb42895229c980419d4 to your computer and use it in GitHub Desktop.
Save stevecass/5eb42895229c980419d4 to your computer and use it in GitHub Desktop.
Starting a new rails app
#Creating an app called my_great_app
rails new my_great_app -T -d postgresql --skip-turbolinks
cd my_great_app
git init
git add .
git commit -m "Initial commit. Rails boilerplate."
# Edit gemfile
# #Remove the reference to coffee-rails.
# Edit Gemfile.
# Uncomment the reference to bcrypt
bundle install
git add .
git commit -m "Enable bcrypt."
# Edit Gemfile.
# Add gem rspec-rails (and faker and factory_girl_rails usually) to the development, test group toward the bottom of the Gemfile.
bundle install
rails g rspec:install
git add .
git commit -m "Set up rspec."
#Create the repo on github. Don't add a .gitignore or license.
#Back in your terminal inside your project folder
git remote add origin https://github.com/your_organization/my_great_app.git
git push -u origin master
#Only now start adding your own code. Apart from ensuring all your tools are in place, doing all the install steps up front gives you a good point to compare back to later
@elizaway
Copy link

elizaway commented Jan 7, 2016

this guide doesn't mention adding shoulda-matchers gem!

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