intercom / intercom-rails

The easiest way to install Intercom in a Rails app.
https://developers.intercom.io/reference
MIT License
280 stars 106 forks source link

After action callback :intercom_rails_auto_include has not been defined #235

Closed attenzione closed 7 years ago

attenzione commented 8 years ago

I'm using this method to disable intercom for some controller, but for staging environment i completely disabled it in config. Seems this issue not related to disabling it for specific environment, as I investigated source code, this method should exist anyway. I think it's Rails 5 With Rails 4 there is no issue.

Version info

After process_action callback :intercom_rails_auto_include has not been defined (ArgumentError)

nburns commented 7 years ago

Also having this same problem, any word on a fix?

attenzione commented 7 years ago

add raise: false to skip_after_action

nburns commented 7 years ago

Setting config.enable_dependency_loading = true in config/application.rb fixed the issue for me. http://blog.bigbinary.com/2016/08/29/rails-5-disables-autoloading-after-booting-the-app-in-production.html

kant01ne commented 7 years ago

Seems to be related to rails 5 disabling autoloading in production as mentioned by @nburns. I'll close this one as I don't think there is much we can do in intercom-rails gem. Let us know if you still have this issue.