Bundler 1.2.0.pre includes a new “ruby” DSL option. According to Heroku’s documentation, they use this new Gemfile syntax to control which ruby version is used when you push your app.
Being pre-release, documentation for the new Bundler option is fairly thin on the ground at the moment, and the Bundler 1.2 roadmap simply lists it as “ruby version check”.
My question is: currently I use a one-line .rvmrc file in most of my projects, in which I only specify the ruby version for that project (eg. rvm ruby-1.9.3). I don’t use RVM gemsets or anything else (I prefer to vendor all of the required gems within the project, and let Bundler manage the dependencies).
Given my trivial RVM config, will the new “ruby” option in Bundler’s DSL mean I no longer need to specify a .rvmrc file at all? Or are they two different things?
(I do like the fact that RVM automatically switches the ruby version when I cd into my project…not sure if Bundler would do that, or if it just warns when the current version doesn’t match?)
the new
rubyis a function and it will allow anything that finally evaluates to a string.Unfortunately o read it you would need to use a
bundlercommand which assumes you already have a ruby.Instead RVM gives you two ways to defining ruby in
Gemfile:1)
ruby "1.9.3"– simple strings2)
#ruby=1.9.3-p125– a comment when you want to use ruby code forrubyor when you want to specify patchlevel or gemset!:Will allow bundler to work with any ruby loaded by RVM but by default will use 1.9.3 from
#ruby=