Rails 1.1.1: Fixing a slew of minors (but you must still freeze Typo)
Posted by David April 06, 2006 @ 08:49 PM
Rails 1.1 was a big upgrade with a lot of new features and we’ve been working hard since its release to polish off the kinks revealed after it was deployed to the masses. Rails 1.1.1 contains fixes for things like Prototype memory leaks in IE 6, Oracle adapter runnings, and a number of compatibility tweaks to make most older applications work.
This release still doesn’t work with Typo, though. And it won’t. Instead you must freeze Rails 1.0 to vendor/rails if you run Typo 2.6.0 while we await the new release from the Typo team that will be fully 1.1 compatible. Read more about Typo and how to freeze Rails.
This is the release we recommend that hosting companies upgrade to. If you still haven’t frozen your application and it for some reason doesn’t work with Rails 1.1.1, don’t run crying to them. We screwed up in the release notes of the last release by not telling people that Typo would break, but now that this information is spread far and wide, it’ll rest on your shoulders to make sure you’re frozen and stay cool.
If you still haven’t upgraded to Rails 1.1, checkout the original announcement for a run-through of all the features.
For the full story, see the changelogs: Rails, Action Pack, Active Record, Active Support, Action Web Service

After upgrading the Rails gem and dependencies, does one upgrade their app by going into the root directory and typing:
rails .
I noticed that some older Rails apps did not run after the Rails 1.0 gem was upgraded to 1.1 without first doing the above. But I haven’t read anything about it.
After updating, some of my apps (but strangely not all of them) complain with the error:
rubygems.rb:149:in `activate’:Gem::Exception: can’t activate rails (= 1.1.0), already activated rails-1.1.1]
A rake rails:freeze:gems fixes it. But just an FYI.
Fyi, I just noticed the apps that gave that error all have the “Engines” plugin. I’m phasing the use of that out, which is why it only affected a couple of my applications. Assuming that’s the cause.
rails 1.1.1 didn’t ship with lib/rails_version.rb. you need to add this file:
/path/to/lib/ruby/gems/1.8/gems/rails-1.1.1/lib/rails_version.rb
and inside it add
this seems to be an engine dependency and it’ll break if it’s not there.
Hopefully they will add it to the gem soon.
Thank you!!! This is an awesome release and it will help me convince more conservative folks to adopt rails.
In future releases, please consider allowing a couple hours for the general public to run rails unit tests on the chosen revision before tagging it for release.
This will allow you to very quickly know if there are OS/Ruby/RDBMS combinations that have problems.
Think about it:
1. announce a revision (RC) and ask public to run unit tests—like “rake test_postgresql” for ActiveRecord.
2. make available a webpage-
or weblog-for people to submit/share their results3. after a quick review, decide whether to go forward with tagging or fixing a newly discovered problem
Think of all the OS/Ruby/RDBMS combos that would get tested within a couple hours if you announced this on IRC.
If the unit test results are published, it would be valuable to people considering which platform to host the newest release of rails. Lets leverage the internet and benefit…
With this approach, ticket #4626 would probably have made it into 1.1.1 and there would be no doubt about which unit tests fail for each OS/Ruby/RDBMS combo.
The Engines plugin is now ready for 1.1.1:
http://dev.rails-engines.org/repository/changesets/344
No need to hack rails_version.rb anymore ;-)
How do I install this upgrade?? if I do gem update it doesn’t shows…
While I haven’t tested this release with Typo trunk yet (that will wait until I get home), I will point out that Typo trunk works with Rails 1.1, so if you’re willing to be a bit on the cutting edge, feel free to check out Typo from subversion and try it out.
Also note that, in subversion, we’re using svn:externals to lock Rails 1.1 into our vendor directory. Once we’ve verified 1.1.1 works with Typo trunk I imagine we’ll lock that in vendor instead.
rake freeze_gems still doesn’t work for me.
Error:
C:\InstantRails\rails_apps\myapp>rake freeze_gems (in C:/InstantRails/rails_apps/myapp) Freezing to the gems for Rails 1.1.0 rm -rf vendor/rails mkdir -p vendor/rails cd vendor/rails Unpacked gem: ‘activesupport-1.3.0’ mv activesupport-1.3.0 activesupport Unpacked gem: ‘activerecord-1.14.0’ mv activerecord-1.14.0 activerecord Unpacked gem: ‘actionpack-1.12.0’ mv actionpack-1.12.0 actionpack Unpacked gem: ‘actionmailer-1.2.0’ mv actionmailer-1.2.0 actionmailer Unpacked gem: ‘actionwebservice-1.1.0’ mv actionwebservice-1.1.0 actionwebservice ERROR: While executing gem … (ArgumentError) Illformed requirement [=#<Gem::Specification name=rails version=1.1.0>] rake aborted! exit no such file to load—C:/InstantRails/rails_apps/myapp/config/. ./vendor/rails/railtie s/lib/initializer C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_requi re.rb:21:in `require __‘ C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_requi re.rb:21:in `require ‘ C:/InstantRails/rails_apps/myapp/config/boot.rb:13 C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_requi re.rb:21:in `require ‘ C:/InstantRails/rails_apps/myapp/rakefile:4 C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.r b:1641:in `load_rake file’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.r b:1713:in `run’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.7.0/bin/rake:7 C:/InstantRails/ruby/bin/rake.bat:25
Upgrading to Rails 1.1.1 caused a slight problem with a JS script we use to support transparent PNGs on IE
ActionPack now appends a timestamp to javascript includes and img refs (to help flush over-eager browser caches when they’re updated), but the script we use was expecting the last 3 chars of the src string to be the file extension ”.png” (and now it is like “foo.png?10385738”). Easy enough to work around, even though I still want to strangle IE6 for the hoops you have to jump through to support transparent PNGs.
I’d like to throw in a second vote for what RailsQA said and recommend going for a pre-release before doing the final release, a high-ranking project like RoR shouldn’t be having such noticable problems this quickly.
We did have a pre-release for Rails 1.1, the release candidate. I even blogged about it on this site http://weblog.rubyonrails.org/articles/2006/03/22/rails-1-1-release-candidate-1-available.
Apparently not enough people was interested in trying it out at the time to completely vet it of problems. Hopefully the next release candidate will get more people interested.
Will ‘branches/stable’ be coming back any time soon? I’d just nailed typo’s SVN repository to that branch with an svn:external and you went and removed it.
Mutter, if the stable branch isn’t stable, what is?
GRIN
Yes, but there were a couple issues with that:
1. It was the first and only RC when the previous release had several RC. This means people (like me) probably thought we’d have a chance to jump in on the 2nd or 3rd RC. That was clearly our mistake—not yours.
2. The RC wasn’t the revision that was released. There were more than a couple changes involving a few lines of code between the RC and the revision that was released. That was not our mistake—it was the core team’s.
I think the combination of the above 2 factors contributed to having a 1.1 release that was a bit less smooth than we prefer.
I’ve learned from my mistake and will correct it by helping test even the first RC. I hope everyone involved will continue improving their methodology.
In response to Jack D, I thought it might be a instant rails issue, but it would appear not to be. I tried it and have deteremined it is line 30 of framework.rake
Gem::GemRunner.new.run([“unpack”, “-v”, ”=#{version}”, “rails”])
which I changed to Gem::GemRunner.new.run([“unpack”, “-v”, ”= #{version}”, “rails”])
which was not enough to fix it, but a good start.
I am also experiencing the same “rake freeze_gems” problem that Jack D. is experiecing and I’m NOT using Instant Rails
I am also experiencing the same “rake freeze_gems” problem that Jack D. is experiecing and I’m NOT using Instant Rails