-
Notifications
You must be signed in to change notification settings - Fork 31
uninitialized constant GraphQL::Pundit #51
Comments
Can you try using |
I am having this same issue. Previously, I was developing off of the class_api branch with no issues. Since changing to |
Ok, if I change my Gemfile reference to |
As far as I can tell, the problem seems to only occur when using However, I could not reproduce the issue with a new rails app (using Ruby 2.5.1, Rails 5.2.0, graphql 1.8.0 and graphql-pundit 0.7.0). |
Could y'all delete the |
I do not use bootsnap. |
Are you sure? It's on by default in new rails versions |
I believe |
Do you have the project online somewhere, so I can have a look? |
Sorry - it is a private repo. Gemfile selection:
query type:
Anything in particular you would like to see? |
Unfortunately debugging is a bit hard when I can't reproduce the error. Could you create a new project that exhibits this error and upload it, so I can play around with it? |
|
What happens when you call |
I can do it, 2 secs |
|
Im using bootsnap and this is run with docker-compose |
We can do a screen share if you want to debug |
if I open IRB i can require it without any problems |
Thanks @phyrog for your work on this. |
@casiodk please try deleting the bootsnap cache as described above. That should fix your problem at least. Since you are using docker-compose, recreating the container should do the trick, unless you have some volume mounted to that particular path. @haizop can you run the |
|
its the same { }, { "id": 9, "trace": "app/graphql/types/query.rb:4:in <module:Types>'" }, { "id": 10, "trace": "app/graphql/types/query.rb:3:in '"}, { "id": 17, "trace": "app/graphql/soundtracktor_api_schema.rb:6:in <class:SoundtracktorApiSchema>'" }, { "id": 18, "trace": "app/graphql/soundtracktor_api_schema.rb:3:in '"}, { "id": 26, "trace": "app/controllers/graphql_controller.rb:17:in `execute'" } ], "Framework Trace": [ { |
@casiodk Did you recreate the container? If so, could you delete the cache files this time? I just realized that your application is probably mounted into the container, so the tmp directory would be mounted too. Recreating would not work in this case. @haizop Sorry, I don't think there is much more I can do at this point without a reproduction repo. Let me know when you could reproduce this in a new project and I'll have a look. Btw: |
i did this
And then inside the container i removed the tmp/cache directory and bundle installed again |
If i log into rails console in this app https://github.com/casiodk/graphhhhh I get this result
|
Oookay, so @haizop was right initially, something definitely went wrong during the gem build. I just downloaded the gem from Rubygems again and noticed that it is completely empty. 🤦♂️ I will merge #52 now and make a new release (0.7.1). After that I will retract version 0.7.0 to avoid future problems with this. |
Great, thanks too 👍 |
Thanks @phyrog. I really appreciate your attentive maintenance of this gem. |
I am following the instructions, but I am getting this error
I tried to create a new rails app with only gem 'graphql' + 'graphql-pundit' and i get the same error.?
The text was updated successfully, but these errors were encountered: