heroku - rails 4 specify gems for development, testing and production -


i deployed app on heroku testing , amazon production. on testing , development(local), used postgresql , on amazon ec2 used mysql. want pg gem loaded on testing , development , mysql2 gem loaded on production.

what best practice work around problem?

thanks

the best practice use same dbms development, testing, , production. doubt that's wanted hear...

in event, bundler doesn't support scenario. is, can't tell not install gems in given environment - if won't used. can tell not load gems declaring them in group block (as @mind.blank proposed), still installed. can, however, use simple ruby constructs, namely if-else or case blocks, run code (and load/install gems) given specific condition.

the problem gemfile.lock file out of sync across deployments - not bundler (or capistrano) expects. there flags can use tell deployment ignore gemfile.lock file , bundle install based on it's reading of gemfile if want to...


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -