I am deploying a Sinatra app to Heroku. I am using Bundler for my dependencies. When I run it on my machine, it works with no problem. I launch it with this
config.ru
require "rubygems"
require "bundler"
require "net/http"
require "uri"
Bundler.require
require './application'
run Sinatra::Application
and this
Gemfile
source :gemcutter
gem "sinatra"
gem "aws-s3"
gem "zipruby"
gem "bson_ext"
gem "mongo"
gem "json"
gem "sinatra-subdomain"
When I push it, there are no errors. It shows the bundle being installed fine. Then, when I visit the URL, I get an Application Error. Viewing heroku logs, the error is Unexpected error while processing request: undefined method 'subdomain' for main:Object. That refers to the sinatra-subdomain gem that I am using. If I comment out the subdomain section, the next gem, aws/s3, gives an error. I couldn’t find anything in the documentation to help.
Thanks.
Are you running the same version of Ruby? Compare
heroku stackon heroku, andruby -von your local machine. I’d also post a much longer stacktrace from the heroku logs:heroku logs -n10000