From shantanu.uab at gmail.com Thu Dec 4 19:50:26 2008 From: shantanu.uab at gmail.com (shantanu pavgi) Date: Thu, 4 Dec 2008 18:50:26 -0600 Subject: [TZInfo-users] error at init.rb:4 - constant Object::TimeZone not defined Message-ID: <8afa3f0f0812041650mdb39acbo1d97662772796dbb@mail.gmail.com> I am trying to get my rails project working on a new machine. I am using OpenSuse 10.3 and following steps were performed, 1. installed rubygems 2. installed Rails (1.x) using Suse repository - it didn't have latest version. 3. updated gem version and Rails version. 4. installed other gems such rcov 5. installed 'tzinfo_timezone' plugin Now 'rake db:create:all' or 'script/server' gives me error as - [code=] /home/pavgi/agenda32/vendor/plugins/tzinfo_timezone/init.rb:4:in `remove_const': constant Object::TimeZone not defined (NameError) from /home/pavgi/agenda32/vendor/plugins/tzinfo_timezone/init.rb:4:in `send' from /home/pavgi/agenda32/vendor/plugins/tzinfo_timezone/init.rb:4:in `evaluate_init_rb' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin.rb:103:in `evaluate_init_rb' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin.rb:99:in `evaluate_init_rb' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin.rb:44:in `load' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:33:in `load_plugins' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/plugin/loader.rb:32:in `each' ... 17 levels... from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from script/server:3 [/code] Now, if I comment out the line init.rb:4 [code=] Object.send(:remove_const, :TimeZone) [/code] then above rake command and server start runs successfully. What and where could be the problem? Where do I define the constant Object::TimeZone? Any help for debugging? (The same code runs successfully on my old machine.) Thanks, Shantanu. -------------- next part -------------- An HTML attachment was scrubbed... URL: From phil.ross at gmail.com Fri Dec 5 05:17:07 2008 From: phil.ross at gmail.com (Philip Ross) Date: Fri, 5 Dec 2008 10:17:07 +0000 Subject: [TZInfo-users] error at init.rb:4 - constant Object::TimeZone not defined In-Reply-To: <8afa3f0f0812041650mdb39acbo1d97662772796dbb@mail.gmail.com> References: <8afa3f0f0812041650mdb39acbo1d97662772796dbb@mail.gmail.com> Message-ID: <4ac540410812050217v2756a3bvd70b033cddd708e1@mail.gmail.com> 2008/12/5 shantanu pavgi : > I am trying to get my rails project working on a new machine. I am using > OpenSuse 10.3 and following steps were performed, > 1. installed rubygems > 2. installed Rails (1.x) using Suse repository - it didn't have latest > > version. > 3. updated gem version and Rails version. > 4. installed other gems such rcov > 5. installed 'tzinfo_timezone' plugin Rails 2.1 and later has built-in support for tzinfo. tzinfo_timezone is no longer needed (and appears to be incompatible with Rails 2.2). Take a look at http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/ for an overview of the timezone changes. Regards, Phil -- Phil Ross http://tzinfo.rubyforge.org/ -- DST-aware timezone library for Ruby