Skip to content

Fix "undefined method configure bug #21

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

Merged
merged 2 commits into from
Jul 12, 2020

Conversation

sa73917
Copy link
Contributor

@sa73917 sa73917 commented Jul 10, 2020

Due to rake eagerly loading the jsonapi-rspec gem before the RSpec:Core module, configure isn't available when rspec.rb tries to use it. Requiring rspec/core resolves this issue.

What is the current behavior?

rake is failing with:

NoMethodError: undefined method `configure' for RSpec:Module
.../config/application.rb:20:in `<top (required)>'
.../Rakefile:4:in `require_relative'
.../Rakefile:4:in `<top (required)>'

Caused by:
LoadError: cannot load such file -- jsonapi-rspec
.../config/application.rb:20:in `<top (required)>'
.../Rakefile:4:in `require_relative'
.../Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

What is the new behavior?

rake works as expected

Checklist

Please make sure the following requirements are complete:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • All automated checks pass (CI/CD)

Due to rake eagerly loading the jsonapi-rspec gem before the RSpec:Core module,  configure isn't available when rspec.rb tries to use it.  Requiring rspec/core resolves this issue.
@stas
Copy link
Collaborator

stas commented Jul 10, 2020

@sa73917 let's add rspec-core to the dependencies list and get this merged! 🙃

@sa73917
Copy link
Contributor Author

sa73917 commented Jul 10, 2020

@stas - good point :) - all done...

@stas stas merged commit 799b05e into jsonapi-rb:master Jul 12, 2020
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

Successfully merging this pull request may close these issues.

2 participants