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

Allow usage with api only apps #43

Open
bbarberBPL opened this issue Jun 8, 2022 · 0 comments
Open

Allow usage with api only apps #43

bbarberBPL opened this issue Jun 8, 2022 · 0 comments

Comments

@bbarberBPL
Copy link

Currently if you are using this gem in an app with config.api_only = true and require 'sprockets/railtie' commented out in config/application.rb` you get the following error message when starting the server

../.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems//blacklight_oai_provider-7.0.2/lib/blacklight_oai_provider/engine.rb:9:in `block in <class:Engine>'
../.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/railties-6.1.6/lib/rails/railtie/configuration.rb:97:in `method_missing': undefined method `assets' for #<Rails::Application::Configuration:0x0000562069563760> (NoMethodError)

This is due to this line. https://github.com/projectblacklight/blacklight_oai_provider/blob/7728dba9a38ceb6165335dea817b23c416d82966/lib/blacklight_oai_provider/engine.rb#L8
Adding a check before this to determine if the app is running in API only mode should fix this.

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

1 participant