# Rails::VERSION::STRING shows 1.1.6, but 1.2.1 expected

**URL:** <https://www.ruby-forum.com/t/rails-string-shows-1-1-6-but-1-2-1-expected/84446>\
**Category:** Rails\
**Created:** [February 4, 2007, 6:52pm UTC](https://www.ruby-forum.com/t/rails-string-shows-1-1-6-but-1-2-1-expected/84446 "2007-02-04T18:52:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeanluca](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Post date:** [February 4, 2007, 6:52pm UTC](https://www.ruby-forum.com/t/rails-string-shows-1-1-6-but-1-2-1-expected/84446/1 "2007-02-04T18:52:29Z")

</div>

Hi All

I’ve written an application using rails 1.1.8 or 1.1.6 (I’m not really  
sure)  
Anyway, I’ve updated rails to 1.2.1, like `gem update rails
--include-depedencies`

Now when I create a new project like`rails newProject`  
and I start the scripts/console and  
type`Rails::VERSION::STRING`  
I get 1.2.1  
So far so good. However, when I put all my self-written stuff inside  
this new project, and I repeat the exercise I get the following version  
number: 1.1.6

Any suggestions how this is possible, and how to solve this ?

Thnx a lot  
LuCa

---

<div class="post-metadata">

**Author:** ![jeanluca](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Post date:** [February 4, 2007, 7:14pm UTC](https://www.ruby-forum.com/t/rails-string-shows-1-1-6-but-1-2-1-expected/84446/2 "2007-02-04T19:14:55Z")

</div>

I noticed that the version is hard-coded inside config/environment.rb

Can I just change

RAILS\_GEM\_VERSION = ‘1.1.6’

to

RAILS\_GEM\_VERSION = ‘1.2.1’

or is that a bad idea ?

LuCa

---

<div class="post-metadata">

**Author:** ![jeanluca](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Post date:** [February 4, 2007, 7:18pm UTC](https://www.ruby-forum.com/t/rails-string-shows-1-1-6-but-1-2-1-expected/84446/3 "2007-02-04T19:18:03Z")

</div>

Luca S. wrote:

> I’ve written an application using rails 1.1.8 or 1.1.6 (I’m not really  
> sure)  
> Anyway, I’ve updated rails to 1.2.1, like `gem update rails
> --include-depedencies`  
> [SNIP]  
> So far so good. However, when I put all my self-written stuff inside  
> this new project, and I repeat the exercise I get the following version  
> number: 1.1.6

gem update rails simply installs the most recent gems on your system.  
For your application to use those gems, you need to modify which version  
to load in config/environment.rb.

–  
Jakob S. - [http://mentalized.net](http://mentalized.net)

---

<div class="post-metadata">

**Author:** ![jeanluca](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Post date:** [February 4, 2007, 7:20pm UTC](https://www.ruby-forum.com/t/rails-string-shows-1-1-6-but-1-2-1-expected/84446/4 "2007-02-04T19:20:12Z")

</div>

[http://blog.kogent.net/2007/01/18/rails-12-released-gems-pushed-life-is-good/](http://blog.kogent.net/2007/01/18/rails-12-released-gems-pushed-life-is-good/)

---

<div class="post-metadata">

**Author:** ![jeanluca](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Post date:** [February 4, 2007, 8:27pm UTC](https://www.ruby-forum.com/t/rails-string-shows-1-1-6-but-1-2-1-expected/84446/5 "2007-02-04T20:27:11Z")

</div>

On that topic, is there some sort of general way to keep all the files  
in  
script/ and config/ up to date with the rails version?

---

<div class="post-metadata">

**Author:** ![jeanluca](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Post date:** [February 5, 2007, 4:09am UTC](https://www.ruby-forum.com/t/rails-string-shows-1-1-6-but-1-2-1-expected/84446/6 "2007-02-05T04:09:49Z")

</div>

I ran into this problem a few weeks ago. If I ran ruby script\about I  
got 1.1.6 and running rails -v was 1.2.1. Or was it the other way  
around?

Anyway, I was sure the update was correct. Another poster told me when  
the app is generated it hardcodes the original version you installed.  
Just change it in environment.rb and it’ll match.
