Setup Rails Projects

Setup

This post is meant to be a reminder for me on how to quickly setup a Rails project.

Run the following in terminal to remove Minitest and setup database.yml with postgresql. Remove username and pass from production initially(optional)

rails new project -T -d=postgresql

Refer to blog post Feature Testing to see how to setup Rspec Feature testing with factory-girl and capybara.

If using devise and omniauth for authorization, need to install devise, omniauth, and activerecord-session_store gems in Gemfile. (activerecord-session_store allows for more bytes to be transferred in sessions)

dotenv gem allows for storage of environment variables in development and testing.

unicorn gem is a Rack based http server. Need to config Procfile for production on Heroku.

web: bundle exec unicorn config.ru -p $PORT