SpringAll icon indicating copy to clipboard operation
SpringAll copied to clipboard

Deploying to Heroku without a local bundle install

Open rivendale2010 opened this issue 13 years ago • 3 comments

I used to deploy master to Heroku pods very quick from anywhere without having to change the Gem file and run a bundle install.

But now i have to modify Gemfile and run bundle install to create a new Gemfile.lock before push.

Running: rake assets:precompile rake aborted! Please install the postgresql adapter: gem install activerecord-postgresql-adapter (pg is not part of the bundle. Add it to Gemfile.)

rivendale2010 avatar Jun 04 '13 17:06 rivendale2010

We kinda have to decide what's the bigger tradeoff, defaulting to install both adapters, which breaks the situation for all MySQL users and requires the developers to have the headers for mysql and postgres available or let the few Heroku users do a local bundle. The real issue here lies in bundler itself, see https://github.com/bundler/bundler/issues/1636

jhass avatar Jun 04 '13 19:06 jhass

thanks. i guess there is lot's going on there!

Seems like Heroku writes out it's Gemfile, so it has this nasty habit of not letting you clear the lock after this happens.

( Even changing the environment variables can make Heroku think you changed the Gemfile.) You can some times fool this by creating a Gemfile to match to even with the wrong Gemlock, but no combinations work for this.

At that point -- if you can not do a bundle install, you have to delete your app and recreated it. :)

rivendale2010 avatar Jun 04 '13 21:06 rivendale2010

i broke down and used bundle. lol... :) just for fyi these are the lines in Gemfile that used to do the trick. i think now it is impossible without local bundle.

group :heroku do gem 'pg' end

rivendale2010 avatar Jun 05 '13 05:06 rivendale2010