Simple:
git push heroku tag_name:master –force
The –force is not normally needed, but i needed it because i’d already deployed git head, so needed this to avoid git complaints
Simple:
git push heroku tag_name:master –force
The –force is not normally needed, but i needed it because i’d already deployed git head, so needed this to avoid git complaints
It turns out that Rails 3.1 doesn’t come with a database adapter. So, when deploying to heroku, the app will blow up unless you add the require postgres gem to your gem file:
group :production do
gem “pg”
end
This resolves the heroku error
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:71:in `rescue in establish_connection’: Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.)
Tonight, i ran into an issue with Heroku, where is was failing when installing a gem that i have within my :development bundler group:
group :development, :test, :cucumber do
gem ‘ruby-debug19′
end
As the clear solution was to prevent heroku installing gems that it didn’t need, i found this handy heroku command:
heroku config:add BUNDLE_WITHOUT=”development:test:cucumber”
Running this has told heroku to ignore gems that it doesn’t need, meaning the deploy worked fine. Further details: http://devcenter.heroku.com/articles/bundler
This resolves the heroku error:
Installing linecache19 (0.5.12) with native extensions /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions’: ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)