I downloaded version 0.3.12 of TZInfo from [1], and observed that it
has a very robust set of timezones including, for example, ''America/
Anchorage'':
irb(main):001:0> require ''rubygems''
=> false
irb(main):002:0> require ''tzinfo''
=> true
irb(main):003:0> TZInfo::Timezone.get(''America/Anchorage'')
=> #<TZInfo::DataTimezone: America/Anchorage>
Within Rails 2.2, however, which appears to have the same version of
the gem (see the error that follows), the set of timezones is far more
limited.
irb(main):001:0> require ''rubygems''
=> true
irb(main):002:0> require ''active_support''
=> true
irb(main):003:0> TZInfo::Timezone.get(''America/Anchorage'')
TZInfo::InvalidTimezoneIdentifier: no such file to load -- tzinfo/
definitions/America/Anchorage
from /usr/local/lib/ruby/gems/gems/activesupport-2.2.2/lib/
active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb:108:in `get''
from (irb):3
Perhaps the maintainers of TZInfo didn''t bump up the version number of
the gem after adding additional timezone data?
Matt
[1] http://rubyforge.org/frs/?group_id=894
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Matt Jones
2009-Mar-15 19:10 UTC
Re: TZInfo included in Rails 2.2.2 vs. version on RubyForge
The bundled TZInfo is intentionally limited in size. If you have the full version installed, Rails will load that instead. See also this ticket: http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1344 --Matt Jones On Mar 13, 4:26 pm, matto <matt.os...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I downloaded version 0.3.12 of TZInfo from [1], and observed that it > has a very robust set of timezones including, for example, ''America/ > Anchorage'': > > irb(main):001:0> require ''rubygems'' > => false > irb(main):002:0> require ''tzinfo'' > => true > irb(main):003:0> TZInfo::Timezone.get(''America/Anchorage'') > => #<TZInfo::DataTimezone: America/Anchorage> > > Within Rails 2.2, however, which appears to have the same version of > the gem (see the error that follows), the set of timezones is far more > limited. > > irb(main):001:0> require ''rubygems'' > => true > irb(main):002:0> require ''active_support'' > => true > irb(main):003:0> TZInfo::Timezone.get(''America/Anchorage'') > TZInfo::InvalidTimezoneIdentifier: no such file to load -- tzinfo/ > definitions/America/Anchorage > from /usr/local/lib/ruby/gems/gems/activesupport-2.2.2/lib/ > active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb:108:in `get'' > from (irb):3 > > Perhaps the maintainers of TZInfo didn''t bump up the version number of > the gem after adding additional timezone data? > > Matt > > [1]http://rubyforge.org/frs/?group_id=894--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---