- Generate a new Rails app
rails new [APP-NAME] -T -d postgresql --skip-turbolinks
- Make an initial commit
cd [APP-NAME]
git init
git add .
git commit -m "Initial commit. Rails boilerplate."
- Remove coffee script remove coffee-rails from Gemfile
Gemfile
gem 'coffee-rails'
Terminal
bundle install
git add .
git commit -m "Remove coffee-rails."
- Add testing Gems. Add gem rspec-rails (and faker usually) to the development, test group toward the bottom of the Gemfile.
Gemfile
group :development, :test do
...
gem 'rspec-rails'
gem 'rails-controller-testing'
gem 'faker'
end
Terminal
bundle install
rails g rspec:install
git add .
git commit -m "Set up rspec."
-
Create the repo on github, but not with a .gitignore since we'll be using the .gitignore from Rails.
-
Add Github remote address
Back in your terminal inside your project folder
git remote add origin https://github.com/[ORGANIZATION]/[APP-NAME].git
git push -u origin master
- Start adding your own code. Happy Coding.