Gemfile says:
gem 'sqlite3', :groups => [:development, :test]
gem 'mysql2', :group => :production
yet when I type bundle install
on my development machine ALL gems are installed.
What's wrong with my setup?
Now, If I use following command: bundle install --without production. In above command, the --without production option prevents the local installation of any production gem means whatever gems are in the production group will not be installed -- which in our example is just one gem: pg .
bundle install is a command we use to install the dependencies specified in your Gemfile.
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.
The most common question I've heard about Bundler is about the difference between bundle install and bundle update . In a nutshell: bundle install handles changes to the Gemfile and bundle update upgrades gems that are already managed by Bundler.
The point of Bundler is to create a consistent gem environment across deployments. Gems, unfortunately, can interact even if they aren't loaded or required. So for maximum consistency, all gems should be installed, even if they aren't all required.
However, if you don't want all gems installed all the time, you can use the bundle install --without
option.
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