Toto on windows 7, works locally, app crashes on Heroku

Aperta
#64 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
ruby
Ambito
backend, cloud

Direzione di ricerca

Inizia con l’errore di sintassi segnalato in lib/toto.rb:338 e confrontalo con il runtime Ruby 1.8.7 mostrato nel log di Heroku. Esamina config.ru solo come punto di ingresso dell’applicazione, quindi verifica che l’applicazione venga caricata correttamente su Heroku senza il crash di inizializzazione segnalato.

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

Descrizione

I've got Toto up and running on Windows 7. I can go to http://localhost:3000 and see it working.

But no matter what I try it doesn't work once I push to Heroku. I thought maybe adding the URL to config.ru was the fix, but no luck.

Am I just missing something?

Here's what heroku logs spits out:


$ heroku logs
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': /home/slugs/365543_a47478a_e5b6-e19bddc5-30
-4a92-ace2-570e7eeccc8a/mnt/.gems/gems/toto-0.4.8/lib/toto.rb:338: syntax error, unexpected tIDENTIFIER, expecting tAMPER (SyntaxError)
      response = @site.go(route, *(mime ? mime : []), env)
                                                         ^
        from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from config.ru:2
        from /home/heroku_rack/heroku.ru:23
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:46:in `new'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:46:in `map'
        from /home/heroku_rack/heroku.ru:18
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
        from /home/heroku_rack/heroku.ru:11:in `new'
        from /home/heroku_rack/heroku.ru:11
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
        from /home/heroku_rack/heroku.ru:1:in `new'
        from /home/heroku_rack/heroku.ru:1

==> dyno-3392350.log (crash) <==
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': /home/slugs/365543_a47478a_e5b6-e19bddc5-30
-4a92-ace2-570e7eeccc8a/mnt/.gems/gems/toto-0.4.8/lib/toto.rb:338: syntax error, unexpected tIDENTIFIER, expecting tAMPER (SyntaxError)
      response = @site.go(route, *(mime ? mime : []), env)
                                                         ^
        from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from config.ru:2
        from /home/heroku_rack/heroku.ru:23
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:46:in `new'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:46:in `map'
        from /home/heroku_rack/heroku.ru:18
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
        from /home/heroku_rack/heroku.ru:11:in `new'
        from /home/heroku_rack/heroku.ru:11
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
        from /home/heroku_rack/heroku.ru:1:in `new'
        from /home/heroku_rack/heroku.ru:1

-----> An error happened during the initialization of your app.

       This may be due to a typo, wrong number of arguments, or calling a
       function that doesn't exist.

       Make sure the app is working locally in production mode, by running it
       with RAILS_ENV (for Rails apps) or RACK_ENV (for Sinatra or other rack
       apps) set to production. e.g. RAILS_ENV=production script/server.

       Examine the backtrace above this message to debug.
Lingua principale
Ruby
Stelle
1.5k
Fork
237
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 cloudhead/toto

Tutte le issue di cloudhead/toto

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.