0

I want to use datamapper in a rails app i want to deploy on heroku. Therefore i need to add dm-postgres-adapter to my Gemfile. Is there any way to have heroku installing this gem without installing postgreSQL locally?

Joe
  • 11
  • 1
  • You can do this as Yock pointed out, but it's a bad idea. Your development environment should be as close as possible to your production environment. Bite the bullet and install Postgres - it's an excellent database anyway. – PreciousBodilyFluids Feb 12 '11 at 00:02
  • It is exceedingly common for production environments to differ from those in which you develop and test. While it is good in principle to keep your environments as close as possible, your code should tolerate sweeping changes in environment configuration. I would go so far as to say that if your code doesn't tolerate such changes then you've made mistakes that need to be addressed. – Mike Yockey May 13 '11 at 12:13

1 Answers1

1

Limit its context to production using "group".

group :production do
  gem "gemname"
end
Mike Yockey
  • 4,565
  • 22
  • 41
  • I would just add that you need to tell bundler to skip this group, ie 'bundle install --without production'. I actually had this same issue and had to read a separate source to find out how to skip the group. – wuliwong Jan 11 '12 at 04:58