msjit / testcasedb

TestCaseDB - Web based test case management
MIT License
40 stars 18 forks source link

Getting NoMethodError: `google_auth_enbled` after i try to access localhost #16

Closed harshith30 closed 10 years ago

harshith30 commented 10 years ago

Hi , After starting the rails server in production environment when i try to access local host i get the following error.

screenshot from 2014-06-27 12 35 59

  since the last patch ,where Google auth should be disabled by default on the file
db/migrate/20140605100724_create_settings_google_auth.rb 

my file looks exactly the same as the changes made    

screenshot from 2014-06-27 12 31 35

Still when i try to access localhost , i get the following error

 [root@localhost testcasedb]# bundle exec rails server -e production

  => Booting WEBrick
  => Rails 3.2.14 application starting in production on http://0.0.0.0:3000 
  => Call with -d to detach
  => Ctrl-C to shutdown server
  /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use    String#encode instead.
  [2014-06-27 12:47:17] INFO  WEBrick 1.3.1
  [2014-06-27 12:47:17] INFO  ruby 1.9.3 (2014-05-14) [x86_64-linux]
  [2014-06-27 12:47:17] INFO  WEBrick::HTTPServer#start: pid=4088 port=3000

 Processing by HomeController#index as HTML
 Redirected to http://localhost:3000/login?referer=%2F
 Filter chain halted as :require_login rendered or redirected
 Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
 Started GET "/login?referer=%2F" for 127.0.0.1 at 2014-06-27 12:48:03 +0530

 NoMethodError (undefined method `value' for nil:NilClass):
 app/controllers/application_controller.rb:107:in `google_auth_enabled'

 Processing by UserSessionsController#new as HTML
 Parameters: {"referer"=>"/"}
 Completed 500 Internal Server Error in 3ms

Out of curiosity , the files application_controller.rb and user_sessions_controller.rb
both of them have used google_auth_enabled , does it has anything to do with the error which i'm facing , below is how they look.


application_controller.rb
screenshot from 2014-06-27 13 01 13


user_sessions_controller.rb

screenshot from 2014-06-27 13 01 22

 how to resolve this error.

 Thanks
 Harshith 
joffems commented 10 years ago

I have pushed a fix for interpreting settings from the DB. Can you please pull the latest code and re-try.

harshith30 commented 10 years ago

Hi, That solved the " NoMethodError: google_auth_enbled " , Since this issue is resolved I'm closing it.

 Thanks
 Harshith