Config Tips - YaleSTC/reservations GitHub Wiki

Development

  • Can't start your rails s due to an execjs runtime error? Make sure therubyracer is uncommented out in your gemfile.

  • CSS or javascript changes no longer autoloading in development? Rails will serve assets if it finds preexisting files in the pipeline. Try rake assets:clean

Production

  • No css or javascript in production mode? Run RAILS_ENV=production rake assets:precompile and make sure config/environments/production.rb line config.serve_static_assets is set to true. Webservers serve static assets automatically but when 'testing' production make sure to set this manually.

Testing

  • Suddenly all the tests are failing? RAILS_ENV=test rake db:drop && rake db:create && rake db:migrate
  • Alternatively to the above, you can set your recurring test task to be rake db:test:prepare && rspec