Question

Most tutorials I see have ruby '2.0.0' stated in their Gemfile

When I type ruby -v I get the following:

ruby 2.0.0p195 (2013-05-14) [i386-mingw32]

Am I also okay with stating ruby 2.0.0 or do I have to specify ruby 2.0.0p195 ??

Was it helpful?

Solution

Specifying a ruby version on your Gemfile is just a way of telling to bundler: "please complain if there is a ruby version mismatch". To actually enforce which Ruby version should be used, you could use a ruby version manager such as rbenv or rvm.

A different patchlevel (e.g. p195) won't cause you any issues but for the shake of completeness, since Bundler 1.5 you can specify a Ruby patchlevel with the following syntax:

ruby '2.0.0', :patchlevel => "195"

See the Bundler 1.5 changelog for more details.

OTHER TIPS

Specifying just the Ruby version should work.

If you really have to restrict the patchlevel use:

ruby '2.0.0', :patchlevel => '195'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top