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

undefined method: singleton #105

Open
EnziinSystem opened this issue Jan 9, 2022 · 1 comment
Open

undefined method: singleton #105

EnziinSystem opened this issue Jan 9, 2022 · 1 comment

Comments

@EnziinSystem
Copy link

My environment:

  • Ruby 3.1.0
  • Rails 7.0.1
  • Ubuntu 20.04

I created a simple blog application for the demo and I use VSCode.

When I open any file then the typeprof gem show warning and an error message but the app does not error any.

[warning] superclass is any; Object is used insteadTypeProf
[error] undefined method: singleton(PostsController)#before_actionTypeProf

typeprof

@devjoaoGustavo
Copy link

devjoaoGustavo commented Apr 18, 2022

I have exactly the same problem. It seems it can't load the Rails environment.
I tried to add require_relative '../../../config/environment' at the beginning of the file and the warning messages were gone.
I'm just starting learn more about the typeprof, but I don't understand yet how could I set up the gem for loading the Ruby on Rails environment.

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

No branches or pull requests

2 participants