# Bundler ignores :group =\> :production?

**URL:** <https://www.ruby-forum.com/t/bundler-ignores-group-production/183415>\
**Category:** Rails\
**Created:** [February 13, 2010, 2:11pm UTC](https://www.ruby-forum.com/t/bundler-ignores-group-production/183415 "2010-02-13T14:11:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@cwd](https://www.ruby-forum.com/u/cwd)\
**Post date:** [February 13, 2010, 2:11pm UTC](https://www.ruby-forum.com/t/bundler-ignores-group-production/183415/1 "2010-02-13T14:11:10Z")

</div>

I’m using SQLite on my dev box and MySQL in production. I’m also  
running an old mysql adapter gem in production that worked around  
problems with the MySQL adapter and Ruby 1.9.1. That gem was hosted on  
github and hasn’t been moved anywhere, so it’s only available locally  
on my production machine.

No problem, I think, I’ll just set up my Gemfile with:

group :production do  
gem “hectoregm-mysql-ruby”, “2.8.1”  
end

Works fine in production, but back in development, I get this error:

/usr/local/lib/ruby/gems/1.9.1/gems/bundler-0.9.3/lib/bundler/  
resolver.rb:163:in `resolve’: Could not find gem ‘hectoregm-mysql-ruby  
(\>= 0, runtime)’ in any of the sources. (Bundler::GemNotFound)

Doesn’t shock me that Bundler can’t find this gem, but why is it  
looking for it? I’m in development.

I realize there are a dozen ways to work around this, but I’m more  
interested in understanding what specifying an environment in Bundler  
does. My first guess was that it should, say, specify which gems are  
required in which environment, which would mean the absence of a gem  
required only in production would not throw an exception when you try  
to launch your app in development. But now it looks like I’m wrong. Or  
am I just doing something wrong?

---

<div class="post-metadata">

**Author:** ![cwd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@cwd](https://www.ruby-forum.com/u/cwd)\
**Post date:** [February 14, 2010, 1:16pm UTC](https://www.ruby-forum.com/t/bundler-ignores-group-production/183415/2 "2010-02-14T13:16:59Z")

</div>

At my dev box it doesn’t listen to the group parameter either. Just to  
let  
you know that it isn’t just your box â€“ maybe something in Rails 3?

2010/2/13 Steve R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
