This project is archived and is in readonly mode.
Installing rails 2.1 breaks the existing 2.0.2 apps
-
Jeremy Kemper
- 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
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
Did you freeze your old apps to 2.0.2? Set RAILS_GEM_VERSION = '2.0.2' in config/environment.rb
-
David Krmpotic
yes.
-
Ronald de Gunst
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 http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
Your config/boot.rb is outdated: Run "rake rails:update".
Exiting
What info do you want?
-
Mauro Cicio
- Tag set to bug, edge
Jeremy,
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
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
- 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
I haven't frozen Rails... !
-
Clemens Kofler
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
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
versions.
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
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
If there's a valid place, it's most likely the mailing list at http://groups.google.com/group/r....
-
David Krmpotic
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
David,
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
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
- 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
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
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
- 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
Michael,
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".