Add this line to the Gemfile inside the :production group (add it if you don't have one).
group :production do gem 'pg' gem 'rails_12factor' end
Itβs clear from the error itself that gem pg must be added to your Gemfile . You may have added it simply, but you need to add a gem to your development and production machine specifically because the Heroku application is the production machine for your system, and your localhost is Development.
Your Gemfile should look like this:
source 'https://rubygems.org' ruby '2.0.0' gem 'rails', '4.0.0' gem 'bootstrap-sass', '2.3.2.0' gem 'bcrypt-ruby', '3.0.0' gem 'faker', '1.1.2' gem 'will_paginate', '3.0.4' gem 'bootstrap-will_paginate', '0.0.9' group :development, :test do gem 'sqlite3', '1.3.8' gem 'rspec-rails', '2.13.1' end group :doc do gem 'sdoc', '0.3.20', require: false end group :production do gem 'pg', '0.15.1' gem 'rails_12factor' end
Abhinay
source share