【发布时间】:2020-12-23 15:40:54
【问题描述】:
尝试使用heroku 启动一个全新的rails 项目,按照https://devcenter.heroku.com/articles/getting-started-with-rails5 和https://devcenter.heroku.com/articles/getting-started-with-rails6 中的步骤操作。两次当我尝试推送到 heroku master 时,我都得到了
remote: -----> Detecting rake tasks
remote:
remote: !
remote: ! Could not detect rake tasks
remote: ! ensure you can run `$ bundle exec rake -P` against your app
remote: ! and using the production group of your Gemfile.
remote: ! /tmp/build_4403463c/config/boot.rb:5:in `require': cannot load such file -- bootsnap/setup (LoadError)
remote: ! from /tmp/build_4403463c/config/boot.rb:5:in `<top (required)>'
remote: ! from /tmp/build_4403463c/bin/rake:7:in `require_relative'
remote: ! from /tmp/build_4403463c/bin/rake:7:in `<main>'
remote: !
我试图用救援包围bootsnap/setup,但它仍然击中了这个街区。
【问题讨论】:
-
你确定你在 Gemfile 中有
gem 'bootsnap' -
ensure you can run `$ bundle exec rake -P` against your app——嗯,可以吗? -
是的,我仔细检查了这两项,bootsnap 已安装,我可以在本地运行 bundle exec rake -P,即使在生产模式下也是如此。我无法检查我的 heroku,因为我第一次推送失败,这意味着该框甚至从未创建。
标签: ruby-on-rails heroku