This project is archived and is in readonly mode.

#371 ✓invalid
David Krmpotic

Installing rails 2.1 breaks the existing 2.0.2 apps

Reported by David Krmpotic | June 8th, 2008 @ 01:44 PM

gem install rails

gem list rails

*** LOCAL GEMS ***

rails (2.1.0, 2.0.2)

$ rake db:version (on an app that has RAILS_GEM_VERSION = '2.0.2')

"Your config/boot.rb is outdated: Run "rake rails:update" with rake


after running "rake rails:update" everything is ok, but now I have

2.0.2 app with new boot.rb script... if I take that app somewhere where 2.1 is not installed, it won't work.. and the point is that "rake

install rails" broke the existing 2.0.2 app.... I had this confirmed

by one other guy on IRC and also Koz on the Core mailing list.

It was also very subtle, since I use Background Job for sending signup emails.. and this stopped working, because it uses script/runner ... (which also failed in the same way as db:version for example)

Koz saz:

This sounds like a bug with rails gem version stuff.

I'm not yet very familiar with Rails source, so I would appreciate if someone else looked into this particular problem. I'll also be of some help soon I hope... ! Also let me know if this and the other ticket could be reported in a better way.

Thank you

Comments and changes to this ticket

  • Jeremy Kemper

    Jeremy Kemper June 8th, 2008 @ 04:05 PM

    • State changed from “new” to “invalid”

    What's the breakage here?

    You upgrade to 2.1, you have a 2.1 app, not a 2.0.2 with new boot.rb script.

  • David Krmpotic

    David Krmpotic June 8th, 2008 @ 04:30 PM

    Sorry for maybe being unclear..

    If you install Rails 2.1 via gems and don't touch old (2.0.2) apps, they stop working !! To fix the issue one has to create the new boot.rb script for the old apps (before upgrading the completely)

  • Jeremy Kemper

    Jeremy Kemper June 8th, 2008 @ 09:12 PM

    Did you freeze your old apps to 2.0.2? Set RAILS_GEM_VERSION = '2.0.2' in config/environment.rb

  • David Krmpotic
  • Ronald de Gunst

    Ronald de Gunst June 17th, 2008 @ 10:50 AM

    I have the same problem.

    running mephisto under Rails 2.0.2, after gem update:rails

    ruby script/server

    => Booting Mongrel (use 'script/server webrick' to force WEBrick)

    => Rails 2.1.0 application starting on

    => Call with -d to detach

    => Ctrl-C to shutdown server

    ** Starting Mongrel listening at

    ** Starting Rails with development environment...

    Your config/boot.rb is outdated: Run "rake rails:update".


    What info do you want?

  • Mauro Cicio

    Mauro Cicio July 18th, 2008 @ 06:15 PM

    • Tag set to bug, edge


    I have just had exactly the same problem described by David on a freshly installed debian box (i.e. clean environment).

    As soon as I have installed 2.1, all my applications based on 2.0.2 stopped working. It seems that the line:

    RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION

    is ignored.

  • Clemens Kofler

    Clemens Kofler July 19th, 2008 @ 12:30 PM

    I've got my development machine (OS X Leopard), my testing box (Debian Etch) and my production box (Debian Sarge) all with Rails 2.1. Some of my apps use Rails 1.2.x, some on 2.0.2 and the most recent three are on Rails 2.1. Every single one of them runs perfectly fine with the required Rails version frozen in vendor/rails. So I second Jeremy here: I guess there's got to be something wrong with your configuration rather than with Rails.

  • Mauro Cicio

    Mauro Cicio July 20th, 2008 @ 01:18 PM

    • Tag changed from bug, edge to 2.1

    Hi Clemens,

    Thanks for your answer.

    In development I am using debian etch and RoR 2.0.2 only (all my old applications being upgraded).

    Ruby is 1.8.6 (from sources).

    Mongrel 1.0.4.

    The problem described occurred when I installed the gem 2.1.

    The only difference I can see wuth your environment: I did not freeze the rails RoR version.

    Now, so far, when I moved from any Rails version to the next one, freezing RoR has never been never necessary. As long as I had the necessary gem versions installed and the right version requested in environment.rb, things were running all right. I can see the point in freezing, but I don't think this should be strictly required, right?

    Do you think the freezing is the issue?

    David, Roland, you seems to have my problem: have you frozen your versions?

  • David Krmpotic

    David Krmpotic July 20th, 2008 @ 04:58 PM

    I haven't frozen Rails... !

  • Clemens Kofler

    Clemens Kofler July 20th, 2008 @ 06:44 PM

    There is no reason whatsoever not to freeze Rails apart from the first commit taking a little longer. It saves you the pains you described because incompatibilities don't happen - every app takes the Rails version that you froze in vendor/rails.

    First steps of setting up a Rails project:

    • rails your_app_name
    • cd your_app_name
    • rake rails:freeze:gems

    Just do it! ;-)

  • Ronald de Gunst

    Ronald de Gunst July 20th, 2008 @ 07:00 PM

    Hi Mauro,

    I had different rails versions by gems.

    To solve my problem I froze RoR 2.0.2.

    I use rails since 0.8 and never had any problems with the use off different


    A few weeks ago I thougth 'lets solve this issue.'

    I unfroze Rails, and there was no problem anymore!?

    After that I was not in the mood for further investigations. Was this a

    problem, or a black-out?

    Now you make me curious. Maybe I can make time later this evening for a

    fresh review.

    2008/7/20 Lighthouse :

  • Mauro Cicio

    Mauro Cicio July 20th, 2008 @ 07:16 PM

    Hi Clemens,

    Thanks for the advice. As said, I have nothing against freezing, but if with 2.1 it becomes mandatory, then I want to understand it at a deeper level.

    David, how does it look for you now? Frozen, not frozen, working?

    Ronald, I have time for further investigation myself.

    Maybe investigating this is off topic here? If so, is there anybody that can point me to the right place?

    In any case feel free to contact me at "mauro a7 cicio d0t com"

  • Clemens Kofler

    Clemens Kofler July 20th, 2008 @ 07:20 PM

    If there's a valid place, it's most likely the mailing list at

  • David Krmpotic

    David Krmpotic July 20th, 2008 @ 09:02 PM

    for me it looks like I upgraded the old app to 2.1 ;)

    So it's no more an issue.. I believe others could do the same easily too... but for the future it would be beneficial if it was made sure that a similar thing doesn't happen again.. If I can help with anything, let me know, but I don't really care if it was an one-time glitch and is very unlikely to repeat ....

  • Mauro Cicio

    Mauro Cicio July 21st, 2008 @ 12:19 AM


    yeah... probably this is what I will end up doing myself or, in alternative, choose the "freeze" path. As you say: not a big deal if it is just a one time thing...

  • John Felix

    John Felix July 24th, 2008 @ 02:21 PM

    I'm new here, but why is this ticket marked as invalid. It seems that there is an underlying bug in that the RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION line is not being honored after upgrading to 2.1. I agree that freezing on 2.0.2 is a valid workaround, but marking this bug as invalid seems to be sweeping a real defect under the rug based on the presence of a workaround.

  • Michael Koziarski

    Michael Koziarski July 24th, 2008 @ 03:03 PM

    • State changed from “invalid” to “open”
    • Assigned user set to “Jeremy Kemper”

    If you're setting RAILS_GEM_VERSION, and you have the gem installed. Then this is indeed a bug.

    Is that what you're doing?

  • Jan De Poorter

    Jan De Poorter July 24th, 2008 @ 03:17 PM

    Works for me, I have not vendored rails, I have these gems:

    rails (2.1.0, 2.0.991, 2.0.2, 1.2.6, 1.2.5, 1.2.3)

    And when I start a rails-app with

    RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION

    in the environment.rb, it just boots 2.0.2

  • Jan De Poorter

    Jan De Poorter July 24th, 2008 @ 03:30 PM

    David and all other people seeing this problem, is it possible to attach your entire environment.rb file, and also your gem list, and maybe your operating systems, so we can look into this better ?

  • Michael Koziarski

    Michael Koziarski July 24th, 2008 @ 04:00 PM

    • Assigned user cleared.

    Yeah, I can't reproduce this as you've described it.

  • Michael Koziarski

    Michael Koziarski July 24th, 2008 @ 04:12 PM

    • State changed from “open” to “invalid”

    If you're still able to reproduce this, can you open another ticket about the RAILS_GEM_VERSION constant not working, and attach your environment.rb file so we can try it out.

  • Mauro Cicio

    Mauro Cicio July 25th, 2008 @ 10:19 AM


    I can stil reproduce the problem (I just installed the gem Rails 2.1.0 again).

    The new ticket is # 701 "RAILS_GEM_VERSION ignored".

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>


Referenced by