Hello, I'm having trouble getting a modular Sinatra app to run correctly in production. The git push heroku master
works fine, but when I try to submit a form through the /contact
page I get:
bundler: failed to load command: rackup (/app/vendor/bundle/ruby/2.4.0/bin/rackup)
.
My Procfile:
web: bundle exec rackup config.ru -p $PORT
My config.ru:
require 'rubygems'
require 'bundler'
Bundler.require
require_relative 'lib/app'
run Tir::App
My lib/app.rb
:
require 'sinatra/base'
require File.expand_path('articles', File.dirname(__FILE__))
require File.expand_path('static', File.dirname(__FILE__))
require File.expand_path('landing', File.dirname(__FILE__))
module Tir
class App < Sinatra::Base
#code
end
end
I've tried all manner of tweaks but am stuck! Thanks for any help.
Top comments (1)
Hi Alex,
thanks for the reply. I'm assuming your example above is for a classic-style (not subclassed) Sinatra app? Mine is subclassed / modular, so I'm pretty much following the recipe outlined here: oreilly.com/library/view/sinatra-u...
I might give a classic-style version a try though, if only for debugging purposes. Cheers!