简体   繁体   中英

Rails .present? works locally but not on Heroku

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!

您的current_tenant nil导致崩溃。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM