1

我有一个尝试在 Heroku 上运行的 Ruby 应用程序。我一直在使用 AWS Cloud9 环境遵循“学习足够多的 Ruby 变得危险”教程。一切都按计划进行,除非我将应用程序推送到 Heroku。在 Heroku 日志中,我收到以下消息

=======================================
2021-01-17T05:18:53.012581+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p ${PORT:-5000}`

2021-01-17T05:18:55.973947+00:00 app[web.1]: bundler: failed to load command: rackup (/app/vendor/bundle/ruby/2.6.0/bin/rackup)

2021-01-17T05:18:55.973977+00:00 app[web.1]: Gem::Exception: can't find executable rackup for gem rack. rack is not currently included in the bundle, perhaps you meant to add it to your Gemfile?

2021-01-17T05:18:55.973978+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.1.4/lib/bundler/rubygems_integration.rb:374:in `block in replace_bin_path'

2021-01-17T05:18:55.973978+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.1.4/lib/bundler/rubygems_integration.rb:402:in `block in replace_bin_path'

2021-01-17T05:18:55.973979+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/bin/rackup:23:in `<top (required)>'

=======================================

Gemfile的是

source 'https://rubygems.org'

gem 'sinatra', '2.1.0'
gem 'rerun',   '0.13.1'
gem 'rack'
gem 'donb0099_palindrome'

group :test do
  gem 'minitest',           '5.14.2'
  gem 'minitest-reporters', '1.4.2'
  gem 'rack-test',          '1.1.0'
  gem 'rake',               '13.0.3'
  gem 'nokogiri',           '1.10.10'
end

========================================

该应用程序在本地环境中运行良好,但在 Heroku 上,我运行 https 地址并获得应用程序错误消息和对 Heroku 日志的引用。

我将此解释为启动进程的 Heroku 命令找不到我猜是 rack gem 的一部分的 rackup gem。对于下一步该做什么,我束手无策。

想法??

4

0 回答 0