RVM: How to remove all gems from default gemset
To remove all gems from a gemset you use the gemset empty command:
$ rvm gemset empty <my_gemset_name>
And to remove the gems from default gemset, you must supply an empty string as the gemset name:
$ rvm gemset empty ""
Why rails bundler doesn’t install gems inside a group?
As usual I have several gems in bundler groups called :development and :test.
My Gemfile looks like this.
source 'http://rubygems.org' gem 'rails', '3.0.3' gem 'sqlite3-ruby', :require => 'sqlite3' gem 'paperclip' gem 'aws-s3' gem 'rack-cors', :require => 'rack/cors' gem 'will_paginate', '~> 3.0.beta', :require => 'will_paginate' group :test, :development do gem "rack-test", :path => "vendor/gems/rack-test-0.5.7" gem "rspec-rails", "~> 2.4" gem "cucumber-rails", ">= 0.3.2" gem "capybara", "~> 0.4.1.1" gem 'simplecov', '>= 0.3.8', :require => false # Will install simplecov-html as a dependency end gem 'rest-client'
Everything worked fine, but some day when I run the bundle install command, these gems were ignored and it only installs the gems that not belongs to any group.
That happens because doing some tests related to production environment (few days ago) I ran:
bundle install --without development
And bundler remembers that I did this and will automatically repeat this for the next time
bundle install #remembers and includes --without development
To clear the “cache” I just run:
bundle install --without nothing
And now bundler installs all the gems