Skip to content

Testing & Development

Sam Pohlenz edited this page Apr 19, 2021 · 1 revision

When running tests, you may want to run tests as per CI

CI=1 rspec spec

You may want to run the development server for the dummy app (used by specs):

# setup
rails credentials:edit
rails db:setup:all
rails db:migrate

# run server on port 3000
rails s

You may want to run the production server for the dummy app (used by specs):

# setup
export RAILS_ENV=production RAILS_SERVE_STATIC_FILES=1
rails credentials:edit
rails db:setup:all
rails db:migrate
rails assets:precompile

# allows you to run server on port 3001 in parallel with dev server
rails s -p 3001 -e production --pid tmp/pids/production.pid