John
2008-Oct-04 17:24 UTC
Help with debugging - undefined method `[]'' for nil:NilClass (NoMethodError) ?
Hello all, Question for you all... I never came across this yet, I have an app where in developement it works perfect, but when I tried to launch it in production mode I received the following error below.. How can I figure out what undefined method is? /filestore/files/projects/keith/config/environment.rb:56: undefined method `[]'' for nil:NilClass (NoMethodError) More details: ** Starting Rails with production environment... Exiting /filestore/files/projects/keith/config/environment.rb:56: undefined method `[]'' for nil:NilClass (NoMethodError) from ./script/../config/../vendor/rails/railties/lib/ initializer.rb:95:i n `run'' from /filestore/files/projects/keith/config/environment.rb:18 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_re quire'' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'' from /filestore/files/projects/keith/vendor/rails/ activesupport/lib/acti ve_support/ dependencies.rb:510:in `require'' from /filestore/files/projects/keith/vendor/rails/ activesupport/lib/acti ve_support/ dependencies.rb:355:in `new_constants_in'' from /filestore/files/projects/keith/vendor/rails/ activesupport/lib/acti ve_support/ dependencies.rb:510:in `require'' from /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ rails.rb:14 7:in `rails'' from /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails: 113:in `cloa ker_'' from /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/ configurator.rb:14 9:in `call'' from /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/ configurator.rb:14 9:in `listener'' from /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails: 99:in `cloak er_'' from /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/ configurator.rb:50 :in `call'' from /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/ configurator.rb:50 :in `initialize'' from /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails: 84:in `new'' from /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails: 84:in `run'' from /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/ command.rb:212:in `run'' from /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails: 281 from /filestore/files/projects/keith/vendor/rails/ activesupport/lib/acti ve_support/ dependencies.rb:503:in `load'' from /filestore/files/projects/keith/vendor/rails/ activesupport/lib/acti ve_support/ dependencies.rb:503:in `load'' from /filestore/files/projects/keith/vendor/rails/ activesupport/lib/acti ve_support/ dependencies.rb:355:in `new_constants_in'' from /filestore/files/projects/keith/vendor/rails/ activesupport/lib/acti ve_support/ dependencies.rb:503:in `load'' from /filestore/files/projects/keith/vendor/rails/railties/lib/ commands/ servers/mongrel.rb:64 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_re quire'' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'' from /filestore/files/projects/keith/vendor/rails/ activesupport/lib/acti ve_support/ dependencies.rb:510:in `require'' from /filestore/files/projects/keith/vendor/rails/ activesupport/lib/acti ve_support/ dependencies.rb:355:in `new_constants_in'' from /filestore/files/projects/keith/vendor/rails/ activesupport/lib/acti ve_support/ dependencies.rb:510:in `require'' from /filestore/files/projects/keith/vendor/rails/railties/lib/ commands/ server.rb:39 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_re quire'' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'' from script/server:3 Thank you in advance! - John --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Rob Biedenharn
2008-Oct-04 17:41 UTC
Re: Help with debugging - undefined method `[]'' for nil:NilClass (NoMethodError) ?
On Oct 4, 2008, at 1:24 PM, John wrote:> Hello all, > > Question for you all... I never came across this yet, I have an app > where in developement it works perfect, but when I tried to launch it > in production mode I received the following error below.. How can I > figure out what undefined method is? > > /filestore/files/projects/keith/config/environment.rb:56: undefined > method `[]'' for nil:NilClass (NoMethodError)Have you looked at what is on that line? No one can even begin to help without knowing that. -Rob Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
John
2008-Oct-04 19:31 UTC
Re: Help with debugging - undefined method `[]'' for nil:NilClass (NoMethodError) ?
Rob, I figured it out, I was referencing a variable that didnt exist. Thanks - John On Oct 4, 1:41 pm, Rob Biedenharn <R...-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org> wrote:> On Oct 4, 2008, at 1:24 PM, John wrote: > > > Hello all, > > > Question for you all... I never came across this yet, I have an app > > where in developement it works perfect, but when I tried to launch it > > in production mode I received the following error below.. How can I > > figure out what undefined method is? > > > /filestore/files/projects/keith/config/environment.rb:56: undefined > > method `[]'' for nil:NilClass (NoMethodError) > > Have you looked at what is on that line? No one can even begin to > help without knowing that. > > -Rob > > Rob Biedenharn http://agileconsultingllc.com > R...-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---