Rails 2.2 RC1: i18n, thread safety, docs, etag/last-modified, JRuby/1.9 compatibility
Posted by David October 24, 2008 @ 12:47 PM
Rails 2.2 is almost ready for its final release, but before we christen the gems, we’d like to have everyone test out a release candidate. Rails 2.2 is a major upgrade that includes a wealth of new features and fixes.
Chief inclusions are an internationalization framework, thread safety (including a connection pool for Active Record), easier access to HTTP caching with etags and last modified, compatibility with Ruby 1.9 and JRuby, and a wealth of new documentation.
Mike Gunderloy has compiled an exhaustive list and walk-through of many of the interesting new features for the Rails 2.2 release notes.
To help test the Rails 2.2 release candidate, please install with:
gem install rails -s http://gems.rubyonrails.org -v 2.2.0
Hopefully there will not be too much folly in the RC and we can quickly move to a final release. But it requires your help to get there.
Note that this release is called 2.2.0, not 2.1.99 as our previous naming scheme would have dictated. So the final release of Rails 2.2 will actually be 2.2.1 (if we only need one RC).

Brazilian/Portuguese Railers, check out the Release Notes in portuguese: http://www.akitaonrails.com/2008/10/24/tradu-o-ruby-on-rails-2-2-release-notes
Great changes. I also note the new naming scheme where 2.2.0 is a RC, rather than a stable. 2.2.1 will be stable. Yay!
Sounds good.
Yey! This is how the world ends! (In a good way)
I have some problems with mysql gem After some tryes I have installed it with: sudo gem install mysql——with-mysql-config=/usr/local/mysql/bin/mysql_config
but rails now give me messages like:
LoadError: Failed to lookup Init function /usr/local/lib/ruby/gems….
Any Ideas? Seems to be some missing path…but can’t solve this.
Great stuff!
Cheers to I18n team for first I18n-compatible Rails!
I am glad that we have a lot better documentation this time. I just cannot imagine how awesome it is.
Thanks a lot. Installing in the background already.
Just a quick one, talking about compatibility: If someone is experiencing compatibility issues with Ruby Enterprise Edition and this release, could you guys let us know about them, please?
Thanks a lot, Keep up the good work.
A.
Looks Excellent! I’ve got a new project starting soon, so perfect timing for me :)
Thanks Mike for the great summary!
I couldn’t wait for the I18n support!
@tejo: maybe your mysql gem isn’t installed correctly. Try it at irb: > require ‘mysql’ =>true It should return true if its correct.
If fails look at these link, maybe helps: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/249986
I would like to say “Great Job” to those that worked on this release. I cannot wait to play with all the new features/updates.
In the afternoon, i just updated from 2.1.1 to 2.1.2 and make a latest app pass all ‘rake spec’ . Just now, i upgrade to 2.2.0. With some tiny effort, only the parts using searchgasm have problem.
Wonderful work!
installing under Ruby1.9 trunk
error create new rails app,
/opt/ruby1.9/lib/ruby/gems/1.9.0/gems/activesupport-2.2.0/lib/active_support.rb:26:in `require’: /opt/ruby1.9/lib/ruby/gems/1.9.0/gems/activesupport-2.2.0/lib/active_support/inflector.rb:281: invalid multibyte char (US-ASCII) (SyntaxError) /opt/ruby1.9/lib/ruby/gems/1.9.0/gems/activesupport-2.2.0/lib/active_support/inflector.rb:281: invalid multibyte char (US-ASCII) /opt/ruby1.9/lib/ruby/gems/1.9.0/gems/activesupport-2.2.0/lib/active_support/inflector.rb:281: syntax error, unexpected $end, expecting ‘)’ if “foo” != Inflector.transliterate(“föö”) ^ from /opt/ruby1.9/lib/ruby/gems/1.9.0/gems/activesupport-2.2.0/lib/active_support.rb:26:in `<top>‘ from /opt/ruby1.9/lib/ruby/gems/1.9.0/gems/rails-2.2.0/lib/rails_generator.rb:28:in `require’ from /opt/ruby1.9/lib/ruby/gems/1.9.0/gems/rails-2.2.0/lib/rails_generator.rb:28:in `<top>‘ from /opt/ruby1.9/lib/ruby/gems/1.9.0/gems/rails-2.2.0/bin/rails:13:in `require’ from /opt/ruby1.9/lib/ruby/gems/1.9.0/gems/rails-2.2.0/bin/rails:13:in `<top>‘ from /opt/ruby1.9/bin/rails:19:in `load’ from /opt/ruby1.9/bin/rails:19:in `<main>‘
@Csiszár Attila thanks for your help…but still get the same error… =(
Thank you guys, fantastic news!
Nice summary. I would just like to point out that Enumerable#several? mentioned under 9.4. was actually renamed to many? inba0f38f8.
Awesome :)
I wonder when Active Record will get proper encapsulation of ‘attributes’. At present it’s impossible to have an interface on a model object.
FAIL!
Cheers! Rails!!
Thanks, Miha – the Release Notes were an RC themselves ;)
UPDATE about the mysql gem madness:
After a load of pain and suffer i solved Installing mysql5 client from port
sudo port install mysql5
and re-installing the mysql gem with this options:
sudo env ARCHFLAGS=”
arch i386” gem install mysql -—with-mysql-include=/opt/local/include/mysql5—with-mysql-lib=/opt/local/lib/mysql5—with-mysql-config=/opt/local/lib/mysql5/bin/mysql_configHope this can help somebody to save some hours of googoling.
@Tom, Had the same issue. I had to add
To the top of inflector.rb, surely not the greatest thing to do but get’s me moving towards testing ruby 1.9 with this rails version. Anyone know the correct way for the encoding to work?
Hmm, yea that should be a pound symbol not the number 1
This release is the first in recent times to not work with the pure-ruby PostgreSQL driver. Was this accidental, or considered an acceptable loss?
@Steve Purcell : Sounds accidental. You might want to drop an email to the core mailing list – http://groups.google.com/group/rubyonrails-core
after installing not able to generate controllers
Macintosh:vms Pra$ ruby script/generate controller Vacancy undefined method `empty?’ for /_generator$/:Regexp
Be careful, If you use cache_template_loading in production.rb or else, you’ll get “undefined method `cache_template_loading=’ for ActionView::Base:Class”. Just remove the line.
For more details see: http://github.com/rails/rails/commit/83e29b9773ac113ceacb1e36c2f333d692de2573
I have gettext installed and starting the server results are:
Exiting /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.0/lib/active_support/core_ext/module/aliasing.rb:33:in `alias_method’: undefined method `render_file’ for class `ActionView::Base’ (NameError) from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.0/lib/active_support/core_ext/module/aliasing.rb:33:in `alias_method_chain’ from /usr/lib/ruby/gems/1.8/gems/gettext-1.93.0/lib/gettext/rails.rb:291 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require’ from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.0/lib/active_support/dependencies.rb:148:in `require’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.0/lib/active_support/dependencies.rb:507:in `new_constants_in’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.0/lib/active_support/dependencies.rb:148:in `require’ from /home/svn/carroll/ivac-ror/app/controllers/application.rb:3
Any idea how to solve this? Thanks
Great work!
Hi I18n team,
I have a translation in tamil language. How to add this to the language set u have.
Regards, Ratnavel.
Excellent
When are you guys expecting to release the final version and the gem?
Personally I prefere the old scheme – because it follows the rule of least surprise.
Hi all,
I have a problem with acts_as_rateable in rails 2.2.0.
ActionView::TemplateError (uninitialized constant <#object>::Rating) on line #10 of app/views/blah/blah.html.erb:
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.0/lib/active_support/dependencies.rb:102:in `const_missing’ /Library/Ruby/Gems/1.8/gems/activerecord-2.2.0/lib/active_record/base.rb:2042:in `compute_type’ /Library/Ruby/Gems/1.8/gems/activesupport-2.2.0/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings’ /Library/Ruby/Gems/1.8/gems/activerecord-2.2.0/lib/active_record/base.rb:2038:in `compute_type’ /Library/Ruby/Gems/1.8/gems/activerecord-2.2.0/lib/active_record/reflection.rb:151:in `send’ /Library/Ruby/Gems/1.8/gems/activerecord-2.2.0/lib/active_record/reflection.rb:151:in `klass’ /Library/Ruby/Gems/1.8/gems/activerecord-2.2.0/lib/active_record/reflection.rb:182:in `quoted_table_name’ /Library/Ruby/Gems/1.8/gems/activerecord-2.2.0/lib/active_record/associations/has_many_association.rb:91:in `construct_sql’ /Library/Ruby/Gems/1.8/gems/activerecord-2.2.0/lib/active_record/associations/association_collection.rb:21:in `initialize’ /Library/Ruby/Gems/1.8/gems/activerecord-2.2.0/lib/active_record/associations.rb:1289:in `new’ /Library/Ruby/Gems/1.8/gems/activerecord-2.2.0/lib/active_record/associations.rb:1289:in `ratings’
This happens only in production mode. Not in development mode.
Any ideas???
Vipin
I have the following error while trying to run the golberg submodule installation.
What does the new config.gems get you that the old $GEM_PATH and $GEM_HOME does not?
See http://wiki.rubyonrails.org/rails/pages/HowToUseMultipleGemRepositories
I just have a global gems repo and the wider use-any-gem functionality of vendor/gems located in RAILS_ROOT/gems by putting GEM_HOME to RAILS_ROOT/gems and setting GEM_PATH to $GEM_HOME:<the rest>
What am I missing?
Excellent
How does a reverse mortgage work?
Hi all, my name is Albert Shulze and i am the owner of Orlando Floor Restoration. I hope that my skill can help a few of you on this board. I am also a proud member of the Natural Stone Restoration Alliance, so if I do not have the answer, I can get it for you.
I couldn’t believe that the Rails core team pick the enterprisey and cryptic i18n vs natural language such as intl or similar!
Installed under Ruby 1.9.1-preview1, got two problems while creating new Rails application:
1) Similar to Tom’s problem with invalid multibyte char – resolved by adding #
coding:utf-8to the top of inflector.rb2) macbook-pro-strock:test_9 strock$ rails . uninitialized constant ActiveSupport::SecureRandom
Don’t know how to resolve second problem. Can you help me with it?
I’m having a lot of problems when porting from Rails 2.x to 2.2 with Inflectors. Such errors as:
uninitialized constant FileColumn::ClassMethods::Inflector
I believe lots of plugins depended on this method. How are you guys safely dealing with this?
@Strock
To resolve “uninitialized constant ActiveSupport::SecureRandom” while running rails, add this to the top of “rails-2.2.0/lib/rails_generator/generators/applications/app/app_generator.rb”
require ‘active_support/secure_random’
I can’t wait for Ruby 1.9 and Rails 2.2 to get finalized and the new Pragmatic Programmer books to come out ( I CAN wait for it all be get done right, though).
@pal, thank you, your advice helped me and I succesfully generated blank Rails 2.2.0 application. Now, when I try to start script/console, I get this:
Loading development environment (Rails 2.2.0) /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.0/lib/active_support/deprecation.rb:10: warning: already initialized constant DEFAULT_BEHAVIORS /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.2.0/lib/action_controller/routing/segments.rb:6: warning: encoding option is ignored – N /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.0/lib/active_support/deprecation.rb:10: warning: already initialized constant DEFAULT_BEHAVIORS /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.0/lib/active_support/dependencies.rb:428:in `rescue in load_missing_constant’: uninitialized constant ActiveSupport::Rescuable (NameError) from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.0/lib/active_support/dependencies.rb:424:in `load_missing_constant’ from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.0/lib/active_support/dependencies.rb:77:in `const_missing_with_dependencies’ from /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.2.0/lib/action_controller/rescue.rb:45:in `included’ from /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.2.0/lib/action_controller.rb:66:in `include’ from /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.2.0/lib/action_controller.rb:66:in `block in <top>‘ from /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.2.0/lib/action_controller.rb:61:in `class_eval’ from /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.2.0/lib/action_controller.rb:61:in `<top>‘ from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.0/lib/active_support/dependencies.rb:148:in `require’ from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.0/lib/active_support/dependencies.rb:148:in `block in require’ from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.0/lib/active_support/dependencies.rb:507:in `new_constants_in’ from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.2.0/lib/active_support/dependencies.rb:148:in `require’ from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.0/lib/initializer.rb:253:in `block in require_frameworks’ from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.0/lib/initializer.rb:253:in `each’ from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.0/lib/initializer.rb:253:in `require_frameworks’ from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.0/lib/initializer.rb:133:in `process’ from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.2.0/lib/initializer.rb:112:in `run’ from /Users/strock/Code/test_9/config/environment.rb:13:in `<top>‘ from /usr/local/lib/ruby/1.9.1/irb/init.rb:249:in `require’ from /usr/local/lib/ruby/1.9.1/irb/init.rb:249:in `block in load_modules’ from /usr/local/lib/ruby/1.9.1/irb/init.rb:247:in `each’ from /usr/local/lib/ruby/1.9.1/irb/init.rb:247:in `load_modules’ from /usr/local/lib/ruby/1.9.1/irb/init.rb:20:in `setup’ from /usr/local/lib/ruby/1.9.1/irb.rb:53:in `start’ from /usr/local/bin/irb:12:in `<main>‘
Yeah, i know how irritating a CAPTCHA box can be, but isn’t it much better than a bunch of spam in the blog?
I have a flash site i’m looking for the script who makes google adsense with flash. do you know this script?
Hello. It is test.
Laticia & Elissa Fucking
2 Hot Lesbians Fucking Each Other http://www.fucking4utoo.com/showthread.php?t=9
barry goldwater range in arizona This website about is focused on [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=29]boob[/url], free online graphic novels hot latina women having hardcore sex in these movies lil jhon snap yo fingers )...[url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=46]femdom tgp[/url]. ! [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=14]her first big cock[/url] important!! What is [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=53]free porn movies[/url] that was xerox solid ink [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=73]free huge tits[/url]. is nice [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=75]sexual intercourse[/url] clean picture jokes appleton attempted homicide shower to wathc. Now [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=119]lesbian threesome[/url]. Today [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=48]disturbed ten thousand fists[/url] free downloadable old english font [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=104]lesbians licking pussy[/url]. Is the [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=111]woman with small tits[/url] or [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=85]male masturbation video[/url] realy [url=https://wiki.ubuntu.com/Der74hva3?action=AttachFile&do=get&target=133]fingering a vagina[/url] grandparents sueing for visitation rights . Ok, now [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=127]transgender sex[/url] is the best [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=95]oral sex[/url] with [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=59]free gay sex movies/urltitty fucking[/url], do u think? this [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=129]transvestite clothing[/url] 1997 harley fxdl vibration . In the [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=12]big round butts[/url] justin timberlakebringing sexy back , [url=https://wiki.ubuntu.com/Der74hva3?action=AttachFile&do=get&target=136]upskirt voyeur[/url]. From now all porn links [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=94]nudes[/url] amazing fist anal is true. what? Why my [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=97]lesbian orgy[/url] everybody love so much? Couse [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=1]anal sex[/url] is audioslave dandelion lyrics and breadman bread machines . Low aluminum recumbent bicycles enforcing noncompetition agreement maine [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=98]free pantyhose gallery[/url] : real [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=55]free porn videos[/url],This [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=35]big clitoris[/url]. ... pang 96 the game new media esplanade job shootings in waipahu ([url=https://wiki.ubuntu.com/Der74hva3?action=AttachFile&do=get&target=132]bald vagina[/url], [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=50]free gay porn movies[/url]) girls giving oral pleasure . alexandro , [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=66]hardcore sex galleries[/url] and [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=119]threesome sex[/url]. nudity tits/urlnude girls[/url], ebonite cross fire and that’s it. A wofford family coat of arms can come [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=76]interracial porn[/url]. So everybody! [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=49]foursome porn/urldisturbed ten thousand fists[/url] black ice defender , integrate . 12 volt ride on jeep australia follow [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=89]milf hunter[/url] rick forrestal and [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=55]free gay porn[/url].What is never norwegian family names is the same as [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=45]female orgasms[/url] and [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=73]huge black tits[/url] with [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=77]kinky girls[/url] prostatasamen melken . Who is jt sprocketschain silencer ? He watch [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=104]lesbian pussy licking[/url] all the time. [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=49]foursome sex/urlteen lesbian[/url] !!! Now…maori tattoo design [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=74]free hustler[/url] so so… Let’s do [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=28]free bondage[/url] satsuma vase gold boobs sexy hot remote control car parts prices [url=http://blake.bcm.tmc.edu/emanwiki/Hval_Derek?action=AttachFile&do=get&target=124]small tits[/url]