Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting some NameError exceptions when my Rails app is first started up #1073

Open
MSeneadza opened this issue Jan 9, 2022 · 2 comments
Open

Comments

@MSeneadza
Copy link

Two days ago I updated my app. I went from:

acts_as_taggable (master branch, which I was running since December 22nd in order to get Rails 7 support)
Ruby 3.0.1
Rails 7.0.0

to

acts_as_taggable 9.0.1
Ruby 3.1.0
Rails 7.0.1

Once I did that I started seeing errors like this in my exception tracker:

NameError: constant ActsAsTaggableOn::Core not defined
NameError: constant ActsAsTaggableOn::Cache not defined
NameError: constant ActsAsTaggableOn::Ownership not defined

They were very infrequent and I could not reproduce them when clicked the URLs that initially triggered them. Today I manually restarted my Heroku web dyno and immediately saw a couple of these exceptions come through. So it seems that something isn't getting loaded properly / fully/ quickly enough when the app starts up.

Here's one of the stack traces:

1
File "/app/vendor/bundle/ruby/3.1.0/gems/acts-as-taggable-on-9.0.1/lib/acts_as_taggable_on/taggable.rb" line 115 in taggable_on
2
File "/app/vendor/bundle/ruby/3.1.0/gems/acts-as-taggable-on-9.0.1/lib/acts_as_taggable_on/taggable.rb" line 41 in acts_as_taggable_on
3
File "/app/vendor/bundle/ruby/3.1.0/gems/acts-as-taggable-on-9.0.1/lib/acts_as_taggable_on/taggable.rb" line 17 in acts_as_taggable
4
File "/app/app/models/equity.rb" line 114 in class:Equity

And like 114 in equity.rb just has acts_as_taggable

I'm not sure if Rails or Ruby changed something to cause this but I'm not seeing any similar errors from any other gems I'm using. So I just thought I'd post to see if anyone else is having this issue.

@Cashaca
Copy link

Cashaca commented Jan 20, 2024

I also have these problems sporadically. Not every time when starting a web dyno on Heroku so probably it depends on the random order in which classes / modules are loaded

constant ActsAsTaggableOn::Core not defined
and also undefined method `all_tags_list_on'

@xpostudio4
Copy link

Does anyone has any idea of the source of this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants