JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources
unable to build w/o specifying rails version in ENV
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 2.3k
- Forks
- 546
- PR merge metrics
- No merged PRs in 30d
Description
This issue is a (choose one):
- [X ] Problem/bug report.
- Feature request.
- Request for support. Note: Please try to avoid submitting issues for support requests. Use Gitter instead.
Checklist before submitting:
- [ X] I've searched for an existing issue.
- [ X] I've asked my question on Gitter and have not received a satisfactory answer.
- [ N/A] I've included a complete bug report template. This step helps us and allows us to see the bug without trying to reproduce the problem from your description. It helps you because you will frequently detect if it's a problem specific to your project.
- [ N/A] The feature I'm asking for is compliant with the JSON:API spec.
Description
Bug reports:
Upon checking out this project you cannot successfully run the test suite following the instructions in the README.
running bundle install at this moment will resolve railties-7.1.1 as a dependency. this will cause https://github.com/cerebris/jsonapi-resources/blob/0ba80a1ef6a7b4dbea3097b207380979336e9376/test/test_helper.rb#L26 to fail with something like:
/Users/knagelberg/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails.rb:51:in `configuration': undefined method `config' for nil:NilClass (NoMethodError)
application.config
^^^^^^^
from /Users/knagelberg/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/testing/maintain_test_schema.rb:11:in `<top (required)>'
from <internal:/Users/knagelberg/.asdf/installs/ruby/3.2.0/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/Users/knagelberg/.asdf/installs/ruby/3.2.0/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /Users/knagelberg/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/test_help.rb:17:in `<top (required)>'
from <internal:/Users/knagelberg/.asdf/installs/ruby/3.2.0/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/Users/knagelberg/.asdf/installs/ruby/3.2.0/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /Users/knagelberg/codes/jsonapi-resources/test/test_helper.rb:26:in `<top (required)>'
setting RAILS_VERSION as suggested in the project:
export RAILS_VERSION=6.1.1; bundle update; bundle exec rake test
solves this problem. perhaps adjusting https://github.com/cerebris/jsonapi-resources/blob/864e810cb96e09f40f4c57db27445d1ef74c6554/Gemfile#L26 to restrict to < 7 would be an acceptable solution.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read Gemfile line 26 and test/test_helper.rb line 26, then reproduce the failure using the README's bundle install and test commands without RAILS_VERSION. Check the Rails dependency resolution and verify that a clean checkout can install dependencies and run the test suite without requiring that environment variable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100