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 authored and lozette committed Dec 21, 2023
1 parent b3b7995 commit 70b6b2b
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 70b6b2b

Please sign in to comment.