0

My Rails app runs fine locally.

But, I'm getting the following error when I try to start my Rails app on Heroku:

Sep 17 09:50:27 ndeavor-staging app/web.1:  /app/app/models/workorder.rb:7:in `<class:Workorder>': undefined method `data' for nil:NilClass (NoMethodError) 

This is line 7 in workorder.rb:

  if ActsAsTenant.current_tenant.data.present?

The tenant.data is an hstore type column (not sure that is pertinent). Some have values in them. Others are blank.

Thanks for the help!

3
  • Issue here is that current tenant is nil Sep 17, 2014 at 17:18
  • If you want to submit as answer, I will accept it. Thanks! PS - I'll have to figure out why current tenant is not nil locally but is nil on Heroku.
    – Reddirt
    Sep 17, 2014 at 17:31
  • :) you have defined set_current_tenant_through_filter? Sep 17, 2014 at 17:35

1 Answer 1

1

Your current_tenant is nil causing the crash.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.