1

I have a Ruby application I am trying to get running on Heroku. I have been following the "Learn enough Ruby to be dangerous" tutorial using a AWS Cloud9 environment. Everything works according to plan except when I push the application to Heroku. In the Heroku logs I get the following message

=======================================
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)>'

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

My Gemfile is

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

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

The application runs fine in the local environment, but on Heroku, I run the https address and get an application error message and a reference to the Heroku logs.

I interpret this as the Heroku command to start the process cannot find the rackup gem which I guess is part of the rack gem. I am at wits end as to what to do next.

Ideas??

Donny Kurnia
  • 5,062
  • 5
  • 32
  • 47

0 Answers0