Our team has long used the well-known practice of rvm
gemset per project . However, after working with the nodejs package manager, we realized that it is much more convenient to add dependencies to the project folder (default for the node package manager).
Having a little rummaged in the documentation of the bandler, I found that the same can be done on its basis.
Using the “path” option, you can specify a project subfolder where gems will be installed (it is recommended to use vendor / bundle). Also do not forget to add it to giginor.
bundle install --path vendor/bundle
echo '/vendor/bundle' >> .gitignore
To run executable files, use the command "bundle exec"
')
bundle exec rails server
bundle exec rake db:migrate
...
Ultimately, rvm will only serve as the version manager for Ruby. The bundler gem itself is best installed in a global gemset.
My original post in English:
Stop using rvm gemset per project use bundler instead!