Skip to content

Commit

Permalink
Application starts in production mode
Browse files Browse the repository at this point in the history
When starting the application with RAILS_ENV=production mode and we run `rake` we get an error that explains we don't have standard installed.

This is correct as out gemfile specifies that we only install standard in the dev and test environments.

This change only tries to load the standard rake task when in the dev or test environment.

Other take tasks such as `rails db:prepare` can still run in any environment as normal.
  • Loading branch information
tahb committed Sep 30, 2022
1 parent 44c7587 commit a10301d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ require_relative "config/application"

Rails.application.load_tasks

desc "Run all the tests"
task default: %i[spec standard]
if Rails.env.development? || Rails.env.test?
desc "Run all the tests"
task default: %i[spec standard]
end

0 comments on commit a10301d

Please sign in to comment.