gpt4 book ai didi

heroku - Sinatra 错误(捆绑程序 : failed to load command: rackup)

转载 作者:行者123 更新时间:2023-12-04 04:39:52 24 4
gpt4 key购买 nike

将模块化 Sinatra 应用程序部署到 Heroku 时,我不断收到此错误:
bundler: failed to load command: rackup (/app/vendor/bundle/ruby/2.4.0/bin/rackup)
我尝试调整我的 config.ru 和 Procfile,但没有成功。以下是 config.ru 的内容:

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

require_relative 'lib/app'
run Tir::App

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

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

请指出我正确的方向。

PS。我能够部署应用程序,但在尝试使用 Pony gem 发送电子邮件时出现上述错误。

2018 年 7 月 20 日编辑:
我已经对此进行了调试,并找到了导致崩溃的行:

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

错误消息现在说:

Internal Server Error: no implicit conversion of Array into String



所以一定是 configure_options中的代码块下面的方法。仍然不知道应该在哪里进行数组 -> 字符串转换。谢谢。

最佳答案

问题不在于代码,而在于 Heroku 的电子邮件插件。从 Mailgun 切换到 SendGrid 立即解决了这个问题。前者旨在混淆,直到您选择他们的付费计划之一;后者以最少的设置帮助您走出大门。

关于heroku - Sinatra 错误(捆绑程序 : failed to load command: rackup),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51321321/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com