Closed rbuenviaje closed 8 years ago
@jfeltesse-mdsol @ykitamura-mdsol @ssteeg-mdsol
@rbuenviaje-mdsol thanks for this PR.
Does that mean that the bundle exec rake
would simply fail for production
environment? If we used this template.
Adding: And not do any harm?
@pmavinkurve-mdsol yep! What we normally have as the default is to run tests, so that wouldn't be possible. Removing test completely from local dev and running rake
causes this error to appear.
/Users/rbuenviaje/.rvm/gems/ruby-2.2.3@mccadmin/gems/activerecord-4.2.6/lib/active_record/connection_adapters/connection_specification.rb:248:in resolve_symbol_connection': 'test' database is not configured. Available: ["development"] (ActiveRecord::AdapterNotSpecified)
I'll be testing this on the cloud in a bit to verify completely, but right now it looks good.
Yep. Tested on Checkmate testing cloud with only production defined.
checkmate@ip-10-224-244-228:~/current$ bundle exec rake
checkmate@ip-10-224-244-228:~/current$
And the database is still fine. :)
@rbuenviaje-mdsol i didn't know checkmate had a database. but thanks for the verification!
LGTM, letting @jcarres-mdsol merge if he's 🆒 with the changes.
Puts in bangs to require that the database_name, password, host, and username are provided when building in production. Also does not build the test/development settings out when running rake config in the production environment. This prevents db:test:prepare or any other default take task that runs on test or development environment to perform actions on the production database.