rodrigo3n
2010-Apr-15 01:09 UTC
Error when Generating a resource, controller or scaffold - Rails 3 beta3
Hello everyone, I just installed Rails 3 beta3 and when attempting to create anything from the Rails generator I get this error: ~/code/blog% rails g resource post title:string content:text /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activesupport-3.0.0.beta3/lib/active_support/values/time_zone.rb: 208:in `utc_offset'': undefined method `current_period'' for nil:NilClass (NoMethodError) from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activesupport-3.0.0.beta3/lib/active_support/values/time_zone.rb: 222:in `<=>'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activesupport-3.0.0.beta3/lib/active_support/values/time_zone.rb: 333:in `sort!'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activesupport-3.0.0.beta3/lib/active_support/values/time_zone.rb: 333:in `<class:TimeZone>'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activesupport-3.0.0.beta3/lib/active_support/values/time_zone.rb:25:in `<module:ActiveSupport>'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activesupport-3.0.0.beta3/lib/active_support/values/time_zone.rb:24:in `<top (required)>'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activesupport-3.0.0.beta3/lib/active_support/time_with_zone.rb:1:in `require'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activesupport-3.0.0.beta3/lib/active_support/time_with_zone.rb:1:in `<top (required)>'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activesupport-3.0.0.beta3/lib/active_support/core_ext/time/zones.rb: 1:in `require'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activesupport-3.0.0.beta3/lib/active_support/core_ext/time/zones.rb: 1:in `<top (required)>'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activesupport-3.0.0.beta3/lib/active_support/core_ext/date/ calculations.rb:3:in `require'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activesupport-3.0.0.beta3/lib/active_support/core_ext/date/ calculations.rb:3:in `<top (required)>'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activesupport-3.0.0.beta3/lib/active_support/ruby/shim.rb:12:in `require'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activesupport-3.0.0.beta3/lib/active_support/ruby/shim.rb:12:in `<top (required)>'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ actionpack-3.0.0.beta3/lib/abstract_controller.rb:4:in `require'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ actionpack-3.0.0.beta3/lib/abstract_controller.rb:4:in `<top (required)>'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ actionpack-3.0.0.beta3/lib/action_controller.rb:1:in `require'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ actionpack-3.0.0.beta3/lib/action_controller.rb:1:in `<top (required)>'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ actionpack-3.0.0.beta3/lib/action_controller/railtie.rb:2:in `require'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ actionpack-3.0.0.beta3/lib/action_controller/railtie.rb:2:in `<top (required)>'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activerecord-3.0.0.beta3/lib/active_record/railtie.rb:9:in `require'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ activerecord-3.0.0.beta3/lib/active_record/railtie.rb:9:in `<top (required)>'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ railties-3.0.0.beta3/lib/rails/all.rb:11:in `require'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ railties-3.0.0.beta3/lib/rails/all.rb:11:in `block in <top (required)>'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ railties-3.0.0.beta3/lib/rails/all.rb:5:in `each'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ railties-3.0.0.beta3/lib/rails/all.rb:5:in `<top (required)>'' from /home/rodrigo3n/code/blog/config/application.rb:3:in `require'' from /home/rodrigo3n/code/blog/config/application.rb:3:in `<top (required)>'' from /home/rodrigo3n/code/blog/config/environment.rb:2:in `require'' from /home/rodrigo3n/code/blog/config/environment.rb:2:in `<top (required)>'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ railties-3.0.0.beta3/lib/rails/commands.rb:29:in `require'' from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ railties-3.0.0.beta3/lib/rails/commands.rb:29:in `<top (required)>'' from script/rails:9:in `require'' from script/rails:9:in `<main>'' How do I fix that? Thanks, Rodrigo3n -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
hiroshi
2010-Apr-16 07:43 UTC
Re: Error when Generating a resource, controller or scaffold - Rails 3 beta3
hi, I got same error. see the commit http://github.com/rails/rails/commit/a0cc94b32e5b4e4dce50787eed1208406f99ea82 On Apr 15, 10:09 am, rodrigo3n <rodrig...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello everyone, I just installed Rails 3 beta3 and when attempting to > create anything from the Rails generator I get this error: > > ~/code/blog% rails g resource post title:string content:text > /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activesupport-3.0.0.beta3/lib/active_support/values/time_zone.rb: > 208:in `utc_offset'':undefinedmethod`current_period'' fornil:NilClass(NoMethodError) > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activesupport-3.0.0.beta3/lib/active_support/values/time_zone.rb: > 222:in `<=>'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activesupport-3.0.0.beta3/lib/active_support/values/time_zone.rb: > 333:in `sort!'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activesupport-3.0.0.beta3/lib/active_support/values/time_zone.rb: > 333:in `<class:TimeZone>'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activesupport-3.0.0.beta3/lib/active_support/values/time_zone.rb:25:in > `<module:ActiveSupport>'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activesupport-3.0.0.beta3/lib/active_support/values/time_zone.rb:24:in > `<top (required)>'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activesupport-3.0.0.beta3/lib/active_support/time_with_zone.rb:1:in > `require'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activesupport-3.0.0.beta3/lib/active_support/time_with_zone.rb:1:in > `<top (required)>'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activesupport-3.0.0.beta3/lib/active_support/core_ext/time/zones.rb: > 1:in `require'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activesupport-3.0.0.beta3/lib/active_support/core_ext/time/zones.rb: > 1:in `<top (required)>'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activesupport-3.0.0.beta3/lib/active_support/core_ext/date/ > calculations.rb:3:in `require'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activesupport-3.0.0.beta3/lib/active_support/core_ext/date/ > calculations.rb:3:in `<top (required)>'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activesupport-3.0.0.beta3/lib/active_support/ruby/shim.rb:12:in > `require'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activesupport-3.0.0.beta3/lib/active_support/ruby/shim.rb:12:in `<top > (required)>'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > actionpack-3.0.0.beta3/lib/abstract_controller.rb:4:in `require'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > actionpack-3.0.0.beta3/lib/abstract_controller.rb:4:in `<top > (required)>'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > actionpack-3.0.0.beta3/lib/action_controller.rb:1:in `require'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > actionpack-3.0.0.beta3/lib/action_controller.rb:1:in `<top > (required)>'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > actionpack-3.0.0.beta3/lib/action_controller/railtie.rb:2:in `require'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > actionpack-3.0.0.beta3/lib/action_controller/railtie.rb:2:in `<top > (required)>'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activerecord-3.0.0.beta3/lib/active_record/railtie.rb:9:in `require'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > activerecord-3.0.0.beta3/lib/active_record/railtie.rb:9:in `<top > (required)>'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > railties-3.0.0.beta3/lib/rails/all.rb:11:in `require'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > railties-3.0.0.beta3/lib/rails/all.rb:11:in `block in <top > (required)>'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > railties-3.0.0.beta3/lib/rails/all.rb:5:in `each'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > railties-3.0.0.beta3/lib/rails/all.rb:5:in `<top (required)>'' > from /home/rodrigo3n/code/blog/config/application.rb:3:in `require'' > from /home/rodrigo3n/code/blog/config/application.rb:3:in `<top > (required)>'' > from /home/rodrigo3n/code/blog/config/environment.rb:2:in `require'' > from /home/rodrigo3n/code/blog/config/environment.rb:2:in `<top > (required)>'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > railties-3.0.0.beta3/lib/rails/commands.rb:29:in `require'' > from /home/rodrigo3n/.rvm/gems/ruby-1.9.2-preview1/gems/ > railties-3.0.0.beta3/lib/rails/commands.rb:29:in `<top (required)>'' > from script/rails:9:in `require'' > from script/rails:9:in `<main>'' > > How do I fix that? > > Thanks, > Rodrigo3n-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
rodrigo3n
2010-Apr-16 22:43 UTC
Re: Error when Generating a resource, controller or scaffold - Rails 3 beta3
Hello Hiroshi, just as I did, you can fix this problem by uncommenting the line 6 of your application''s Gemfile. It worked for Ruby 1.9.1p378. It remains buggy on 1.9.2. Thanks. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Kristian Mandrup
2010-May-10 19:40 UTC
Re: Error when Generating a resource, controller or scaffold - Rails 3 beta3
rodrigo3n wrote:> Hello Hiroshi, just as I did, you can fix this problem by uncommenting > the line 6 of your application''s Gemfile. It worked for Ruby > 1.9.1p378. It remains buggy on 1.9.2. > > Thanks.What is line 6 in the Gemfile? Is it a particular gem that causes the problem? -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.