Sinatra error (bundler: failed to load command: rackup)
Asked Answered
C

1

8

When deploying a modular Sinatra app to Heroku, I keep getting this error:

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

I've tried tweaking my config.ru and my Procfile, without success. Here are the contents of config.ru:

$LOAD_PATH.unshift(::File.expand_path('lib', ::File.dirname(__FILE__)))

require_relative 'lib/app'
run Tir::App

Procfile:

web: bundle exec rackup config.ru -p $PORT

lib/app.rb:

require 'sinatra/base'
module Tir
 class App < Sinatra::Base
  # code
 end
end 

Please point me in the right direction.

PS. I am able to deploy the app, but get the above error when trying to send email with the Pony gem.

EDITED 20.07.2018: I've debugged the heck out of this and found the line that's causing the crash:

https://gist.github.com/abbottjam/248edfd50f094f99b3bf5b1f995fd290#file-static-rb-L15

The error message now says:

Internal Server Error: no implicit conversion of Array into String

So it must be the code block in the configure_options method below. Still no idea where the array -> string conversion is supposed to happen. Thx.

Caputto answered 13/7, 2018 at 8:53 Comment(0)
C
0

The issue wasn't with the code but with Heroku's email add-on. Switching from Mailgun to SendGrid solved the problem immediately. The former is designed to confuse until you choose one of their paid plans; the latter helps you right out of the gate with a minimal setup.

Caputto answered 29/8, 2018 at 14:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.