Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

heroku - I don't want to install postgres locally!

Maybe I am missing something obvious here, but, I am developing an app that for now we want to run on heroku. I develop using mysql. I don't have, or want, to install postgres on my machine here.

I have this in my Gemfile:

gem 'mysql2', '~>0.2.6', :group => :development
gem "pg", :group => :production

Yet, when I do a bundle install on my local machine - in development - I see this:

Installing pg (0.11.0) with native extensions /Users/smyp/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/installer.rb:533:in `build_extensions': ERROR:   Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/Users/smyp/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby extconf.rb 
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***

Which is what I would expect as I don't have postgres locally... but why is it trying to install it?! Doesn't this defeat the purpose of groups?

like image 851
phil Avatar asked Dec 04 '22 21:12

phil


1 Answers

Use bundle install --without production

like image 163
Dogbert Avatar answered Dec 21 '22 05:12

Dogbert