# What happened to Rails::Version::STRING in Rails 1.0.0?

**URL:** <https://www.ruby-forum.com/t/what-happened-to-rails-string-in-rails-1-0-0/51511>\
**Category:** Rails\
**Created:** [January 2, 2006, 2:03am UTC](https://www.ruby-forum.com/t/what-happened-to-rails-string-in-rails-1-0-0/51511 "2006-01-02T02:03:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SSSISO-8859-2SQSRaf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@SSSISO-8859-2SQSRaf](https://www.ruby-forum.com/u/SSSISO-8859-2SQSRaf)\
**Post date:** [January 2, 2006, 2:03am UTC](https://www.ruby-forum.com/t/what-happened-to-rails-string-in-rails-1-0-0/51511/1 "2006-01-02T02:03:48Z")

</div>

Hello,

Maybe it’s a silly question, but I cannot find anything in Rails  
changelog or google it out.  
There is a Rails::Version module (since version 0.14.something) that  
gives me a version number of Rails, similarily to Rails::Info module.  
Apparently in Rails version 1.0 (or maybe sooner) the name of the  
module was changed from ‘Version’ to ‘VERSION’ which breaks my  
debugging template. Is there any reason for this change?  
Of course I understand that there’s no need to look behind 1.0 and  
bother to keep the compatibility with anything older than 1.0, but  
I’d like to widen my Ruby and Rails knowledge.

In 0.14.3 it looks like this:

```
module Rails
  module Version #:nodoc:
    MAJOR = 0
    MINOR = 14
    TINY = 3

    STRING = [MAJOR, MINOR, TINY].join('.')
  end
end

```

and in 1.0.0 it looks like this:

```
module Rails
  module VERSION #:nodoc:
    MAJOR = 1
    MINOR = 0
    TINY = 0

    STRING = [MAJOR, MINOR, TINY].join('.')
  end
end

```

–

Rafa³ Komorowski  
removed\_email\_address@domain.invalid  
GG: 4083718  
[http://homepage.mac.com/komor/iblog/](http://homepage.mac.com/komor/iblog/)

---

<div class="post-metadata">

**Author:** ![SSSISO-8859-2SQSRaf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@SSSISO-8859-2SQSRaf](https://www.ruby-forum.com/u/SSSISO-8859-2SQSRaf)\
**Post date:** [January 2, 2006, 3:58am UTC](https://www.ruby-forum.com/t/what-happened-to-rails-string-in-rails-1-0-0/51511/2 "2006-01-02T03:58:10Z")

</div>

On Jan 1, 2006, at 6:03 PM, RafaÅ? Komorowski wrote:

> Hello,
> 
> Maybe it’s a silly question, but I cannot find anything in Rails  
> changelog or google it out.  
> There is a Rails::Version module (since version 0.14.something)  
> that gives me a version number of Rails, similarily to Rails::Info  
> module.  
> Apparently in Rails version 1.0 (or maybe sooner) the name of the  
> module was changed from ‘Version’ to ‘VERSION’ which breaks my  
> debugging template. Is there any reason for this change?

Yup, there’s a reason. The reason is that having Rails::Version  
caused conflicts with models named Version (because of the way the  
auto-loading code works). Rather than rewrite the auto-loading code  
(which works well enough otherwise), the quick-n-dirty solution was  
to just rename the Rails::Version module to Rails::VERSION.

This issue will be revisited in later Rails releases, though, so  
please don’t think this was an attempt to just sweep it under the rug.

- Jamis

---

<div class="post-metadata">

**Author:** ![SSSISO-8859-2SQSRaf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@SSSISO-8859-2SQSRaf](https://www.ruby-forum.com/u/SSSISO-8859-2SQSRaf)\
**Post date:** [January 3, 2006, 11:22am UTC](https://www.ruby-forum.com/t/what-happened-to-rails-string-in-rails-1-0-0/51511/3 "2006-01-03T11:22:11Z")

</div>

On 02/01/2006, at 03:55, Jamis B. wrote:

> Yup, there’s a reason. The reason is that having Rails::Version  
> caused conflicts with models named Version (because of the way the  
> auto-loading code works).

Thanks for the info.

> This issue will be revisited in later Rails releases, though, so  
> please don’t think this was an attempt to just sweep it under the rug.

I see 🙂  
I hope this will be unchangeable behaviour, once set in first final  
release (that is 1.0). I’m pretty sure you understand (better than  
me) that version-checking is a sensitive matter, since it’s the way  
to make sure my application will behave properly or can be run in the  
particular environment at all. For now I can just forget about  
anything older that v1.0 (but not everyone can, right?) and use the  
new syntax Rails::VERSION. If this breaks in next releases, then the  
whole idea of version checking is broken.

Anyway, thanks for the info, thanks for the Rails 🙂 and happy new  
year.

–

Rafa³ Komorowski  
removed\_email\_address@domain.invalid  
GG: 4083718  
[http://homepage.mac.com/komor/iblog/](http://homepage.mac.com/komor/iblog/)
