rmosolgo / graphiql-rails

Mount the GraphiQL query editor in a Rails app
MIT License
447 stars 135 forks source link

uninitialized constant GraphiQL (NameError) when set to load in other environments #41

Closed joroshiba closed 6 years ago

joroshiba commented 6 years ago

I have two environments configured in which I would like to use GraphiQL (my app behaives slightly differently in an enterprise mode than a development mode and have dev environments for both)

When loading the enterprise development environment I get the above error. GraphiQL should be capable of being mounted in any environment.

rmosolgo commented 6 years ago

Yes, it should be capable to be loaded in any environment! Have you done anything to debug yet?

For example, did you check the entry in your Gemfile? It's not scoped to :development, is it? Are there any differences in how gems are required in the enterprise environment? (Maybe it needs a manual require "graphiql/rails"?)

joroshiba commented 6 years ago

Woops doh, didn't realize it was automatically added for only development group.

Thanks, forry for the bother!

rmosolgo commented 6 years ago

Glad you got to the bottom of it!