0
votes

Here is the new error message I am getting when doing rails s....

Exiting C:/Sites/ThinkBlog/crumblr/config/initializers/devise.rb:235:in block in &lt;top (required)&gt;': undefined method[]' for nil:NilClass (NoMethodError) from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/devise-3.3.0/lib/devise.rb:292:in setup' from C:/Sites/ThinkBlog/crumblr/config/initializers/devise.rb:3:in<top (required)>' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `load'

By the way line 235 in device.rb is ,

config.omniauth :facebook, FACEBOOK_CONFIG['facebook_api_key'], FACEBOOK_CONFIG['facebook_api_secret']
1

1 Answers

0
votes

The error messages tells you exactly what is wrong with your code: undefined method[]' for nil or in other words: You try to call the [] method on an object the is nil.

Since you only call [] on FACEBOOK_CONFIG the only reason for this errors is: FACEBOOK_CONFIG is not initialized and therefore nil.