sinatra app crashes on heroku - failed to load command thin - ruby

I have a Sinatra app that works fine locally, but when I push it to heroku I get this :
2020-12-28T11:11:23.206376+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -p 55504`
2020-12-28T11:11:25.994322+00:00 app[web.1]: Doing `require 'backports'` is deprecated and will not load any backport in the next major release.
2020-12-28T11:11:25.994336+00:00 app[web.1]: Require just the needed backports instead, or 'backports/latest'.
2020-12-28T11:11:26.249566+00:00 app[web.1]: bundler: failed to load command: thin (/app/vendor/bundle/ruby/2.7.0/bin/thin)
2020-12-28T11:11:26.257657+00:00 app[web.1]: NameError: uninitialized constant ActiveRecord::ConnectionAdapters::ConnectionSpecification
2020-12-28T11:11:26.257658+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/sinatra-activerecord-2.0.21/lib/sinatra/activerecord.rb:25:in `registered'
2020-12-28T11:11:26.257659+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1400:in `block in register'
2020-12-28T11:11:26.257659+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1398:in `each'
2020-12-28T11:11:26.257659+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1398:in `register'
2020-12-28T11:11:26.257660+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1969:in `register'
2020-12-28T11:11:26.257660+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:2030:in `register'
2020-12-28T11:11:26.257661+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/sinatra-activerecord-2.0.21/lib/sinatra/activerecord.rb:81:in `<module:Sinatra>'
2020-12-28T11:11:26.257661+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/sinatra-activerecord-2.0.21/lib/sinatra/activerecord.rb:10:in `<top (required)>'
2020-12-28T11:11:26.257662+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:88:in `require'
2020-12-28T11:11:26.257662+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:88:in `rescue in block in require'
2020-12-28T11:11:26.257662+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:65:in `block in require'
2020-12-28T11:11:26.257663+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `each'
2020-12-28T11:11:26.257663+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `require'
2020-12-28T11:11:26.257664+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler.rb:174:in `require'
2020-12-28T11:11:26.257664+00:00 app[web.1]: /app/config/environment.rb:6:in `<top (required)>'
2020-12-28T11:11:26.257665+00:00 app[web.1]: /app/config.ru:1:in `require_relative'
2020-12-28T11:11:26.257665+00:00 app[web.1]: /app/config.ru:1:in `block in <main>'
2020-12-28T11:11:26.257665+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/rack-1.6.13/lib/rack/builder.rb:55:in `instance_eval'
2020-12-28T11:11:26.257666+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/rack-1.6.13/lib/rack/builder.rb:55:in `initialize'
2020-12-28T11:11:26.257666+00:00 app[web.1]: /app/config.ru:1:in `new'
2020-12-28T11:11:26.257667+00:00 app[web.1]: /app/config.ru:1:in `<main>'
2020-12-28T11:11:26.257667+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/thin-1.8.0/lib/rack/adapter/loader.rb:33:in `eval'
2020-12-28T11:11:26.257667+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/thin-1.8.0/lib/rack/adapter/loader.rb:33:in `load'
2020-12-28T11:11:26.257668+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/thin-1.8.0/lib/rack/adapter/loader.rb:42:in `for'
2020-12-28T11:11:26.257668+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/thin-1.8.0/lib/thin/controllers/controller.rb:170:in `load_adapter'
2020-12-28T11:11:26.257668+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/thin-1.8.0/lib/thin/controllers/controller.rb:74:in `start'
2020-12-28T11:11:26.257669+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/thin-1.8.0/lib/thin/runner.rb:203:in `run_command'
2020-12-28T11:11:26.257669+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/thin-1.8.0/lib/thin/runner.rb:159:in `run!'
2020-12-28T11:11:26.257670+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/gems/thin-1.8.0/bin/thin:6:in `<top (required)>'
2020-12-28T11:11:26.257670+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/bin/thin:23:in `load'
2020-12-28T11:11:26.257670+00:00 app[web.1]: /app/vendor/bundle/ruby/2.7.0/bin/thin:23:in `<top (required)>'
2020-12-28T11:11:26.259446+00:00 app[web.1]: 2020-12-28 11:11:25 +0000 Using rack adapter
2020-12-28T11:11:26.325893+00:00 heroku[web.1]: Process exited with status 1
2020-12-28T11:11:26.383463+00:00 heroku[web.1]: State changed from starting to crashed
It's complaining about config.ru. This is it:
require_relative './config/environment.rb'
use EntreeController
use UserController
run ApplicationController
I am not using backports in my gemfile, no clue where that error comes from and the error on uninitialized constant is also not clear to me.
No clue where to start looking for the error.

Related

Heroku: failed to load command: rackup (/app/vendor/bundle/ruby/2.4.0/bin/rackup)

I'm trying to run an app on Heroku but it seems to error out towards the end. What my app does is basically grab videos from a Youtube channel and the number of comments that video has. Everything works well up until the end where I'm about to return the info to another website. This is the error I'm receiving:
2017-06-29T22:27:49.593081+00:00 app[web.1]:===================VIDEO=================
2017-06-29T22:27:49.593082+00:00 app[web.1]: Num Comments: 5
bundler: failed to load command: rackup
(/app/vendor/bundle/ruby/2.4.0/bin/rackup)
2017-06-29T22:27:49.593101+00:00 app[web.1]: SignalException: SIGTERM
2017-06-29T22:27:49.593102+00:00 app[web.1]:
/app/vendor/ruby- 2.4.0/lib/ruby/2.4.0/webrick/server.rb:171:in `select'
2017-06-29T22:27:49.593102+00:00 app[web.1]:
/app/vendor/ruby- 2.4.0/lib/ruby/2.4.0/webrick/server.rb:171:in `block in start'
2017-06-29T22:27:49.593103+00:00 app[web.1]:
/app/vendor/ruby-2.4.0/lib/ruby/2.4.0/webrick/server.rb:33:in `start'
2017-06-29T22:27:49.593104+00:00 app[web.1]:
/app/vendor/ruby-2.4.0/lib/ruby/2.4.0/webrick/server.rb:158:in `start'
2017-06-29T22:27:49.593105+00:00 app[web.1]:
/app/vendor/bundle/ruby/2.4.0/gems/rack-
2.0.3/lib/rack/handler/webrick.rb:34:in `run'
2017-06-29T22:27:49.593105+00:00 app[web.1]:
/app/vendor/bundle/ruby/2.4.0/gems/rack-
2.0.3/lib/rack/server.rb:297:in `start'
2017-06-29T22:27:49.593106+00:00 app[web.1]:
/app/vendor/bundle/ruby/2.4.0/gems/rack-
2.0.3/lib/rack/server.rb:148:in `start'
2017-06-29T22:27:49.593107+00:00 app[web.1]:
/app/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/bin/rackup:4:in `<top
(required)>'
2017-06-29T22:27:49.593108+00:00 app[web.1]:
/app/vendor/bundle/ruby/2.4.0/bin/rackup:22:in `load'
2017-06-29T22:27:49.593108+00:00 app[web.1]:
/app/vendor/bundle/ruby/2.4.0/bin/rackup:22:in `<top (required)>'
2017-06-29T22:27:49.792129+00:00 heroku[web.1]: Process exited with
status 1
I'm not sure this is happening since it works locally when I use ngrok but any insight would be appreciated! Here is my config.ru in case it helps
require 'bundler'
Bundler.require
require File.expand_path(File.dirname(__FILE__) + '/app')
run YoutubeIntegration

500 Internal Server Error Trying to Send an SMS using Twilio

Using Heroku to host a Sinatra app. I have a route that's supposed to send an SMS. It returns a 500 internal server error instead.
Everything works perfectly fine in localhost. The logs show a Twilio::REST::RequestError.
main.rb
post '/sms/send' do
#client = Twilio::REST::Client.new account_sid, auth_token
#client.account.messages.create(
from: '+xxxxxxxxxxx',
to: '+xxxxxxxxxxx',
body: 'Robot invasion! Reply back with any sightings.'
)
end
Logs:
2017-05-17T19:04:24.640120+00:00 heroku[router]: at=info method=POST path="/sms/send" host=dysfunctionalapp.herokuapp.com request_id=a3736f1a-2264-4b91-b0a9-a3bde94342bd fwd="216.73.77.194" dyno=web.1 connect=0ms service=22ms status=500 bytes=255 protocol=https
2017-05-17T19:04:24.639060+00:00 app[web.1]: 2017-05-17 19:04:24 - Twilio::REST::RequestError - Twilio::REST::RequestError:
2017-05-17T19:04:24.639072+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/twilio-ruby-4.13.0/lib/twilio-ruby/rest/base_client.rb:125:in `connect_and_send'
2017-05-17T19:04:24.639074+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/twilio-ruby-4.13.0/lib/twilio-ruby/rest/base_client.rb:55:in `block (2 levels) in <class:BaseClient>'
2017-05-17T19:04:24.639075+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/twilio-ruby-4.13.0/lib/twilio-ruby/rest/list_resource.rb:94:in `create'
2017-05-17T19:04:24.639076+00:00 app[web.1]: /app/main.rb:84:in `block in <top (required)>'
2017-05-17T19:04:24.639078+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1632:in `call'
2017-05-17T19:04:24.639078+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1632:in `block in compile!'
2017-05-17T19:04:24.639079+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:991:in `block (3 levels) in route!'
2017-05-17T19:04:24.639095+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1010:in `route_eval'
2017-05-17T19:04:24.639096+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:991:in `block (2 levels) in route!'
2017-05-17T19:04:24.639097+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1037:in `block in process_route'
2017-05-17T19:04:24.639097+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1035:in `catch'
2017-05-17T19:04:24.639098+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1035:in `process_route'
2017-05-17T19:04:24.639099+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:989:in `block in route!'
2017-05-17T19:04:24.639099+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:988:in `each'
2017-05-17T19:04:24.639100+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:988:in `route!'
2017-05-17T19:04:24.639101+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1094:in `block in dispatch!'
2017-05-17T19:04:24.639101+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1073:in `block in invoke'
2017-05-17T19:04:24.639102+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1073:in `catch'
2017-05-17T19:04:24.639102+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1073:in `invoke'
2017-05-17T19:04:24.639103+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1091:in `dispatch!'
2017-05-17T19:04:24.639104+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:923:in `block in call!'
2017-05-17T19:04:24.639105+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1073:in `block in invoke'
2017-05-17T19:04:24.639105+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1073:in `catch'
2017-05-17T19:04:24.639106+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1073:in `invoke'
2017-05-17T19:04:24.639106+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:923:in `call!'
2017-05-17T19:04:24.639107+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:913:in `call'
2017-05-17T19:04:24.639108+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/xss_header.rb:18:in `call'
2017-05-17T19:04:24.639108+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/path_traversal.rb:16:in `call'
2017-05-17T19:04:24.639109+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/json_csrf.rb:26:in `call'
2017-05-17T19:04:24.639110+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/base.rb:50:in `call'
2017-05-17T19:04:24.639110+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/base.rb:50:in `call'
2017-05-17T19:04:24.639111+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/frame_options.rb:31:in `call'
2017-05-17T19:04:24.639112+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/logger.rb:15:in `call'
2017-05-17T19:04:24.639113+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/common_logger.rb:33:in `call'
2017-05-17T19:04:24.639113+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:231:in `call'
2017-05-17T19:04:24.639114+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:224:in `call'
2017-05-17T19:04:24.639114+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/head.rb:12:in `call'
2017-05-17T19:04:24.639115+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call'
2017-05-17T19:04:24.639116+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:194:in `call'
2017-05-17T19:04:24.639116+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1955:in `call'
2017-05-17T19:04:24.639117+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1499:in `block in call'
2017-05-17T19:04:24.639118+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1726:in `synchronize'
2017-05-17T19:04:24.639118+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/sinatra-2.0.0/lib/sinatra/base.rb:1499:in `call'
2017-05-17T19:04:24.639125+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/thin-1.7.0/lib/thin/connection.rb:86:in `block in pre_process'
2017-05-17T19:04:24.639125+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/thin-1.7.0/lib/thin/connection.rb:84:in `catch'
2017-05-17T19:04:24.639126+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/thin-1.7.0/lib/thin/connection.rb:84:in `pre_process'
2017-05-17T19:04:24.639127+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/thin-1.7.0/lib/thin/connection.rb:53:in `process'
2017-05-17T19:04:24.639127+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/thin-1.7.0/lib/thin/connection.rb:39:in `receive_data'
2017-05-17T19:04:24.639129+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/eventmachine-1.2.3/lib/eventmachine.rb:194:in `run_machine'
2017-05-17T19:04:24.639130+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/eventmachine-1.2.3/lib/eventmachine.rb:194:in `run'
2017-05-17T19:04:24.639130+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/thin-1.7.0/lib/thin/backends/base.rb:73:in `start'
2017-05-17T19:04:24.639131+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/thin-1.7.0/lib/thin/server.rb:162:in `start'
2017-05-17T19:04:24.639132+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/thin-1.7.0/lib/thin/controllers/controller.rb:87:in `start'
2017-05-17T19:04:24.639133+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/thin-1.7.0/lib/thin/runner.rb:200:in `run_command'
2017-05-17T19:04:24.639133+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/thin-1.7.0/lib/thin/runner.rb:156:in `run!'
2017-05-17T19:04:24.639134+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/thin-1.7.0/bin/thin:6:in `<top (required)>'
2017-05-17T19:04:24.639135+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/bin/thin:22:in `load'
2017-05-17T19:04:24.639137+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `load'
2017-05-17T19:04:24.639136+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/bin/thin:22:in `<top (required)>'
2017-05-17T19:04:24.639138+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `kernel_load'
2017-05-17T19:04:24.639139+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/cli.rb:332:in `exec'
2017-05-17T19:04:24.639140+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
2017-05-17T19:04:24.639138+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:27:in `run'
2017-05-17T19:04:24.639140+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
2017-05-17T19:04:24.639141+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
2017-05-17T19:04:24.639142+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/cli.rb:20:in `dispatch'
2017-05-17T19:04:24.639143+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
2017-05-17T19:04:24.639144+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/cli.rb:11:in `start'
2017-05-17T19:04:24.639144+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/exe/bundle:34:in `block in <top (required)>'
2017-05-17T19:04:24.639145+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
2017-05-17T19:04:24.639146+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/bundler-1.13.7/exe/bundle:26:in `<top (required)>'
2017-05-17T19:04:24.639146+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/bin/bundle:22:in `load'
2017-05-17T19:04:24.639147+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/bin/bundle:22:in `<main>'
2017-05-17T19:04:24.639551+00:00 app[web.1]: 216.73.77.194 - - [17/May/2017:19:04:24 +0000] "POST /sms/send HTTP/1.1" 500 30 0.0217
I'm kind of lost. I apologize for the vagueness. Where should I start?
As per discussion in comment, you have configuration problem. You can run program in locally(development environment) and not heroku(production environment).
As you mention in comment, you are using EVN to set credentials. You can do set this in 2 ways to set ENV in Heroku.
1) write configuration in config/production.rb
2) Recommended : Set ENV from Heroku Console. Here is Ref. link to do it Heroku config vars
You can also use Figaro gem for your application.
Hope that helps !

App crash: active_support/dependencies.rb:251:in `require': cannot load such file -- JSON (LoadError)

My app started crashing this afternoon after a deployment.
Here's the stack:
2013-07-26T17:56:41.137752+00:00 app[web.1]: ** [NewRelic][07/26/13 17:56:41 +0000 b35a7e48-4d93-4e0d-af43-376dec33f34b (2)] INFO : Starting Agent shutdown
2013-07-26T17:56:41.467644+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- JSON (LoadError)
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/lib/wwtk/device_api.rb:1:in `<top (required)>'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /
app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:230:in `block in constantize'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:229:in `each'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:502:in `load_missing_constant'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:192:in `block in const_missing'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:190:in `each'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:229:in `constantize'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/finisher.rb:31:in `block in <module:Finisher>'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:190:in `const_missing'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:554:in `get'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:24:in `klass'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:43:in `build'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `block in build'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `each'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `inject'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from config.ru:1:in `<main>'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:140:in `start'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from config.ru:1:in `new'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `build'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:470:in `app'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from config.ru:4:in `block in <main>'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn.rb:44:in `block in builder'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:722:in `call'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:722:in `build_app!'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/bin/unicorn:126:in `<top (required)>'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from config.ru:4:in `require'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn.rb:44:in `eval'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/unicorn:23:in `<main>'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/unicorn:23:in `load'
2013-07-26T17:56:43.135205+00:00 heroku[web.1]: State changed from starting to crashed
We haven't really changed our Gemfile.
The Gemfile.lock already contains json:
> grep json Gemfile.lock
multi_json (~> 1.0)
multi_json (~> 1.0)
json
json (1.8.0)
multi_json (>= 1.5)
multi_json (1.7.6)
multi_json (~> 1.0)
multi_json (~> 1.3)
json (~> 1.4)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0, >= 1.0.2)
I tried to restart the app or use heroku repo:purge_cache. Nothing helped.
Arg. It was a problem of case sensitivity in one of our requires
-require 'JSON'
+require 'json'
Fixed it. The development environment wasn't sensitive to this.

Trouble deploying a Sinatra application on Heroku

I am new to the Ruby and Heroku world and I am trying to deploy a very basic Sinatra app on heroku. I have the following files:
config.ru:
require './hi'
run Sinatra::Application
hi.rb:
require 'rubygems'
require 'sinatra'
get '/' do
"Hello from Sinatra on Heroku!"
end
.gems
sinatra
When push to heroku and launch the app it crashes with the following entry in the logs:
2011-05-03T05:52:02+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.5/lib/sinatra/base.rb:1144:in `define_method': tried to create Proc object without a block (ArgumentError)
2011-05-03T05:52:02+00:00 app[web.1]: from /app/.gems/gems/sinatra-1.2.5/lib/sinatra/base.rb:1144:in `compile!'
2011-05-03T05:52:02+00:00 app[web.1]: from /app/.gems/gems/sinatra-1.2.5/lib/sinatra/base.rb:1129:in `route'
2011-05-03T05:52:02+00:00 app[web.1]: from /app/.gems/gems/sinatra-1.2.5/lib/sinatra/base.rb:1111:in `get'
2011-05-03T05:52:02+00:00 app[web.1]: from /app/.gems/gems/sinatra-1.2.5/lib/sinatra/base.rb:1474:in `send'
2011-05-03T05:52:02+00:00 app[web.1]: from /app/.gems/gems/sinatra-1.2.5/lib/sinatra/base.rb:1474:in `get'
2011-05-03T05:52:02+00:00 app[web.1]: from ./hi.rb:4
2011-05-03T05:52:02+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
2011-05-03T05:52:02+00:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2011-05-03T05:52:02+00:00 app[web.1]: from config.ru:1
2011-05-03T05:52:02+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23
2011-05-03T05:52:02+00:00 app[web.1]: from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
2011-05-03T05:52:02+00:00 app[web.1]: from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
2011-05-03T05:52:02+00:00 app[web.1]: from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:63:in `new'
2011-05-03T05:52:02+00:00 app[web.1]: from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:63:in `map'
2011-05-03T05:52:02+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:18
2011-05-03T05:52:02+00:00 app[web.1]: from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
2011-05-03T05:52:02+00:00 app[web.1]: from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
2011-05-03T05:52:02+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in `new'
2011-05-03T05:52:02+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11
2011-05-03T05:52:02+00:00 app[web.1]: from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
2011-05-03T05:52:02+00:00 app[web.1]: from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
2011-05-03T05:52:02+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `new'
2011-05-03T05:52:02+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1
2011-05-02T22:52:03-07:00 heroku[web.1]: State changed from starting to crashed
Any help would be appreciated.
Problem was sinatra - they updated it, so now everything running smoothly on 1.2.6.

Heroku Sinatra app — unitialized constant Jido

I have a small Sinatra application that is calling a library I developed named Jido. This library is provided by a RubyGem that I list as a dependency in the Sinatra app's Gemfile. I can run this application without experiencing any errors on my local machine, which is running Ruby 1.9.2. When I push to Heroku and visit the page that makes use of this "Jido" library, however, the server returns an error. From the logs I see that the Heroku server is running Ruby 1.8.7. Here is the stack trace in the Heroku error log:
2011-02-16T18:42:29-08:00 app[web.1]: NameError - uninitialized constant Jido:
2011-02-16T18:42:29-08:00 app[web.1]: ./jido.rb:23:in `GET /conjugate/:lang/:verb'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1057:in `call'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1057:in `compile!'
2011-02-16T18:42:29-08:00 heroku[router]: GET jido.heroku.com/conjugate/en/be dyno=web.1 queue=0 wait=1029ms service=5ms bytes=228
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:643:in `instance_eval'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:643:in `route_eval'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:627:in `route!'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:675:in `process_route'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:672:in `catch'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:672:in `process_route'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:626:in `route!'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:625:in `each'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:625:in `route!'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:760:in `dispatch!'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:553:in `call!'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:725:in `instance_eval'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:725:in `invoke'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:725:in `catch'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:725:in `invoke'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:553:in `call!'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:538:in `call'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/methodoverride.rb:24:in `call'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/commonlogger.rb:18:in `call'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1167:in `call'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1193:in `synchronize'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1167:in `call'
2011-02-16T18:42:29-08:00 app[web.1]: /home/heroku_rack/lib/static_assets.rb:9:in `call'
2011-02-16T18:42:29-08:00 app[web.1]: /home/heroku_rack/lib/last_access.rb:15:in `call'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/urlmap.rb:47:in `call'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/urlmap.rb:41:in `each'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/urlmap.rb:41:in `call'
2011-02-16T18:42:29-08:00 app[web.1]: /home/heroku_rack/lib/date_header.rb:14:in `call'
2011-02-16T18:42:29-08:00 app[web.1]: /app/9d9320fd-f5b9-4dca-a96e-0bdee91997b0/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:77:in `call'
2011-02-16T18:42:29-08:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:76:in `pre_process'
2011-02-16T18:42:29-08:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:74:in `catch'
2011-02-16T18:42:29-08:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:74:in `pre_process'
2011-02-16T18:42:29-08:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:57:in `process'
2011-02-16T18:42:29-08:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/connection.rb:42:in `receive_data'
2011-02-16T18:42:29-08:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
2011-02-16T18:42:29-08:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
2011-02-16T18:42:29-08:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/backends/base.rb:57:in `start'
2011-02-16T18:42:29-08:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/server.rb:156:in `start'
2011-02-16T18:42:29-08:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/controllers/controller.rb:80:in `start'
2011-02-16T18:42:29-08:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/thin/runner.rb:143:in `run!'
2011-02-16T18:42:29-08:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/bin/thin:6
2011-02-16T18:42:29-08:00 app[web.1]: /usr/ruby1.8.7/bin/thin:19:in `load'
The lines relevant to this error, in my main Sinatra script:
require 'rubygems'
require 'sinatra'
require 'json'
require 'jido'
conjugators = {}
get '/conjugate/:lang/:verb' do
content_type :json
conjugator = nil
if conjugators[params[:lang]].nil?
conjugator = Jido.load params[:lang] # exception "Uninitialized constant Jido" is thrown here
conjugators[params[:lang]] = conjugator
else conjugator = conjugators[params[:lang]] end
conjugator.conjugate(params[:verb]).to_json
end
As I said, this code runs fine on my machine with Ruby 1.9.2. I have tested calling this Jido module from both the Sinatra app as well as from IRB — both run without problems. I see when I push to Heroku that the jido gem is installed as required by my Gemfile, but for some reason I can not reference it in my Sinatra script.. any ideas?
The full source for the Sinatra app (including the Gemfile and Gemfile.lock) is available at https://github.com/hans/jido-site .
I switched to the bamboo-mri-1.9.2 stack (I was previously on the bamboo-mri-1.8.7 stack) and that fixed it. Thanks so much for the help TK-421!

Resources