cloudhead / cloudhead/toto

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

Open
#64 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
1.5k
Forks
240
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the syntax error reported at lib/toto.rb:338 and compare it with the Ruby 1.8.7 runtime shown in the Heroku log. Review config.ru only as the application entry point, then verify that the app loads successfully on Heroku without the reported initialization crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.