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

unable to build w/o specifying rails version in ENV #1415

Open
2 tasks
Kallin opened this issue Oct 17, 2023 · 0 comments
Open
2 tasks

unable to build w/o specifying rails version in ENV #1415

Kallin opened this issue Oct 17, 2023 · 0 comments

Comments

@Kallin
Copy link

Kallin commented Oct 17, 2023

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

require 'rails/test_help'
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

gem 'railties', '>= 6.0'
to restrict to < 7 would be an acceptable solution.

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 a pull request may close this issue.

1 participant