JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources

unable to build w/o specifying rails version in ENV

Aperta
#1,415 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Ruby
Stelle
2.3k
Fork
546
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Leggi la riga 26 di Gemfile e la riga 26 di test/test_helper.rb, quindi riproduci il fallimento usando i comandi bundle install e di test del README senza RAILS_VERSION. Controlla la risoluzione delle dipendenze di Rails e verifica che un checkout pulito possa installare le dipendenze ed eseguire la suite di test senza richiedere quella variabile d'ambiente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rails, ruby
Ambito
build-system, testing
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.