Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

NoMethodError in after callback inside Grape::Middleware::Formatter

Aperta
#2,139 14 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
ruby
Ambito
api

Direzione di ricerca

Start with Grape::Middleware::Formatter and reproduce the NoMethodError using the status(200) response shown in the issue. Trace the failing after callback and establish the expected response behavior; done means the reported error is reproduced, its cause is identified, and the behavior is covered by an appropriate regression test.

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

Descrizione

bug?

I am getting Grape::Middleware::Formatter : undefined method `collect' for #<Stream:0x00007f685ce13270>
My code works fine, I have tested each line by my hand but if I run the whole API this error appears.
My code is as follow

        @stream = Stream.new(stream_params)
        @stream.location_id = get_location
        @stream.user_id = @streamer.id
        @stream.university = @university
        @stream.category = @category
        @stream.save!
        status(200){
          'message': 'successfully created the stream request'
        }
Lingua principale
Ruby
Stelle
10k
Fork
1.2k
Merge medio
14h 9m
PR unite (30g)
96

Guida per i contributori

Apri la guida per i contributori

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.

Altre issue di ruby-grape/grape

Tutte le issue di ruby-grape/grape

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.