I have several gems including ruby-debug in a bundler group called :development. When I run the bundle command, these gems are ignored and it only installs the gems that are not in any group. How can I make sure bundler doesn't ignore the gems in the :development group?
Edit: This is what my Gemfile looks like.
source 'http://rubygems.org' gem 'rails', '3.0.1' # Auth gems gem "devise", "1.1.3" gem "omniauth" # Bundle Mongoid gems gem "mongoid", "2.0.0.beta.19" gem "bson_ext" # Asset gems gem 'jquery-rails' gem "jammit" # Controller gems gem 'inherited_resources', '1.1.2' # View gems gem 'haml' gem 'formtastic', '~> 1.1.0' # Nokogiri gem "mechanize" gem "json" group :development do gem "ruby-debug" gem 'compass' gem 'compass-colors' gem 'pickler' gem 'haml-rails' gem 'rails3-generators' gem "hpricot" gem "ruby_parser" gem 'fog' end
Show activity on this post. I know that when using gem install , the gem will be stored under /home/username/. rvm/gems/, under which gemset the gem was installed.
run the command bundle install in your shell, once you have your Gemfile created. This command will look your Gemfile and install the relevant Gems on the indicated versions. The Gemfiles are installed because in your Gemfile you are pointing out the source where the gems can be downloaded from.
Within a term session, it remembers the without
option. If you first ran
bundle install --without development
it remembers that you did this and will automatically repeat this for the next
bundle install #remembers and includes --without development
running something else, like bundle install --without nothing
should clear the cache. Am I right?
update 20150214: This is fixed in bundler 2.0, according to issue referenced in comment by @Stan Bondi (https://github.com/bundler/bundler/issues/2862). Thanks Stan.
If you are using rails, there will be a file config
written into a hidden dir called .bundle
in your rails root directory:
.bundle/config
This file, in my case, held exactly the without
settings.
So I just deleted the .bundle
directory:
rm .bundle -r
After that:
bundle install
worked again as expected.
Using: bundler (1.5.2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With