Looking for some clarification on the benefits of using a gemset in my application and the difference between these two scenarios
1) Specify the ruby version in my
So a few things.
.ruby_version is used to specify which version of ruby to use for the folder you are within. This is useful if you are running multiple versions of ruby and for ensuring the application runs that version of ruby. If there is no
.ruby-version then the global version of ruby will be used.
When you call gem install or bundler it will install the gems according the version of ruby that it is called from. So if your global version of ruby is ruby-2.0 and you local ruby in
.ruby_version is ruby-2.3.0 and you call bundle install from your local ruby, it will install gems against ruby-2.3.0.
.ruby-version is unrelated to the
.ruby-gemset and can be used with or without it.
.ruby-gemset file specifies the gemset that an application should use, much like a Gemfile.lock file that bundler creates. If you are starting your application with
bundle exec the application will use the bundled gems installed. If you just start your application, the global gems will be used and scoped if you have a
Some folks like myself love bundler, others don't. You do not need to use bundler, but like other package managers in other applications it does make life easier in certain scenarios.
See this old example about specifying ruby versions for your gems in your GemFile (http://rakeroutes.com/blog/how-to-use-bundler-instead-of-rvm-gemsets/)