我正在尝试将我的Rails应用程序从本地计算机启动到HEROKU。我已经搜索了stackoverflow,但似乎找不到有关此问题的信息-有人说这是一个配置文件,而有人说这是package.json文件。没有一个真正有效-我缺少什么吗?
宝石文件
group :development do
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
Heroku日志-尾巴
2019-05-14T07:31:46.981736+00:00 heroku[web.1]: State changed from crashed to starting
2019-05-14T07:31:50.681385+00:00 heroku[web.1]: Starting process with command `bundle exec rails server thin -p 18879 -e production`
2019-05-14T07:31:55.137458+00:00 heroku[web.1]: State changed from starting to crashed
2019-05-14T07:31:55.106359+00:00 heroku[web.1]: Process exited with status 1
2019-05-14T07:31:55.019384+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:33:in `require': cannot load such file -- thin (LoadError)
2019-05-14T07:31:55.019424+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
2019-05-14T07:31:55.019426+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
2019-05-14T07:31:55.019428+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
2019-05-14T07:31:55.019438+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/handler/thin.rb:1:in `<top (required)>'
2019-05-14T07:31:55.019440+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
2019-05-14T07:31:55.019446+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
2019-05-14T07:31:55.019448+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
2019-05-14T07:31:55.019450+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
2019-05-14T07:31:55.019451+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
2019-05-14T07:31:55.019453+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
2019-05-14T07:31:55.019458+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
2019-05-14T07:31:55.019460+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
2019-05-14T07:31:55.019467+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/handler.rb:20:in `const_get'
2019-05-14T07:31:55.019469+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/handler.rb:20:in `block in get'
2019-05-14T07:31:55.019470+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/handler.rb:20:in `each'
2019-05-14T07:31:55.019472+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/handler.rb:20:in `inject'
2019-05-14T07:31:55.019473+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/handler.rb:20:in `get'
2019-05-14T07:31:55.019475+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/lib/rack/server.rb:301:in `server'
2019-05-14T07:31:55.019477+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:105:in `use_puma?'
2019-05-14T07:31:55.019482+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:76:in `print_boot_information'
2019-05-14T07:31:55.019484+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:47:in `start'
2019-05-14T07:31:55.019486+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:147:in `block in perform'
2019-05-14T07:31:55.019487+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `tap'
2019-05-14T07:31:55.019489+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `perform'
2019-05-14T07:31:55.019490+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
2019-05-14T07:31:55.019492+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
2019-05-14T07:31:55.019494+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
2019-05-14T07:31:55.019495+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform'
2019-05-14T07:31:55.019500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke'
2019-05-14T07:31:55.019502+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<top (required)>'
2019-05-14T07:31:55.019504+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
2019-05-14T07:31:55.019505+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
2019-05-14T07:31:55.019507+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
2019-05-14T07:31:55.019508+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
2019-05-14T07:31:55.019510+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
2019-05-14T07:31:55.019512+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
2019-05-14T07:31:55.019513+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
2019-05-14T07:31:55.019515+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
2019-05-14T07:31:55.019522+00:00 app[web.1]: from bin/rails:9:in `<main>'
2019-05-14T07:31:55.022993+00:00 app[web.1]: Exiting
2019-05-14T07:31:56.410195+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=warm-harbor-88564.herokuapp.com request_id=5926f399-ce9e-4671-b545-de0eb7dca827 fwd="66.229.63.152" dyno= connect= service= status=503 bytes= protocol=https
2019-05-14T07:31:57.780810+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=warm-harbor-88564.herokuapp.com request_id=7b9663f4-abe7-4281-a41d-f867dc8e5aad fwd="66.229.63.152" dyno= connect= service= status=503 bytes= protocol=https
答案 0 :(得分:1)
错误消息
require': cannot load such file -- thin (LoadError)
表示您正在尝试将thin
gem加载到应用程序中,但是Gemfile
中没有引用–可能是您在开发机器中手动安装了它,或者将错误仅在生产环境上运行。
只需将thin
宝石添加到您Gemfile
gem 'thin'
再次运行bundle install
并将更改重新部署到Heroku。