1

Most rails projects have a very specific version included in their gemfile, right after a rails new foo.

For example gem 'rails', '3.1.3'

Would it not be better to change this to allow dot-version and e.g. define rails as gem 'rails', '~>3.2'?

How is rails version-numbering done? I see major changes between dot-releases, e.g. upgrading from 3.0 to 3.1 requires quite severe changes (mostly to the asset pipeline). How is that for subreleases? Is 3.2.1 a bugfixonly release of 3.2.0?

eebbesen
  • 5,070
  • 8
  • 48
  • 70
berkes
  • 26,996
  • 27
  • 115
  • 206
  • you have to see their `release` notes. Its their convention & they stick to their policies. – uday Feb 07 '12 at 18:41

1 Answers1

1

There's not really any reason not to use the ~> constraint, but you should put:

gem 'rails', '~>3.1.3'

since that will mean any 3.1.x that is at least 3.1.3. Putting ~>3.1 implies compatibility with any Rails version 3.x.

Rails versioning follows semantic versioning, as far as I know.

However, I think the idea of specifying the exact version is that you read the release notes with every release and make a specific effort to validate that it's okay. Ultimately it's all up to you, though. You should be sure you're somehow following a feed for Rails versions so you always know about security releases either way.

Andrew Marshall
  • 95,083
  • 20
  • 220
  • 214