Answer the question
In order to leave comments, you need to log in
Ruby why use gemset if there is a bundler?
Hello
I use RVM as my Ruby version manager. I can't figure out for what purpose to use separate gemsets in rail projects. After all, you can simply register the gems in the Gemfile , did a bundle install and they are locked in the Gemfile.lock file.
Answer the question
In order to leave comments, you need to log in
Well, in general, it seems like gemsets are made to group gems and not clog the system with their unnecessary versions. But I also somehow don't use them at all.
These technologies developed in parallel, as a result, it turned out that it was more convenient to use gemsets during development, and a bundler to deploy the application.
Bundler was not always on the same rails, but RVM was already there then)
There is a catch in the bundler.
Yes, Bandler installs the versions specified in the gemfile.
But:
1) sets them globally
2) does not control the use of the required versions
That is, it can control, but for this you need to write before each command bundle exec
- otherwise the gem file is ignored, and the latest versions of gems installed globally are used.
But with gemsets, gems are placed locally for each set, and there is a guarantee that the correct version of the gems will be used.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question