Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 由于Bootsnap和Rake问题,Heroku Rails构建失败_Ruby On Rails_Heroku - Fatal编程技术网

Ruby on rails 由于Bootsnap和Rake问题,Heroku Rails构建失败

Ruby on rails 由于Bootsnap和Rake问题,Heroku Rails构建失败,ruby-on-rails,heroku,Ruby On Rails,Heroku,我试图跟随,但似乎无法在Heroku上运行构建 我的构建日志在这里: 以下是迄今为止我尝试调试的错误: ! Could not detect rake tasks ! ensure you can run `$ bundle exec rake -P` against your app ! and using the production group of your Gemfile. 在本地运行bundle exec rake-p ! /tmp/bui

我试图跟随,但似乎无法在Heroku上运行构建

我的构建日志在这里:

以下是迄今为止我尝试调试的错误:

 !     Could not detect rake tasks
 !     ensure you can run `$ bundle exec rake -P` against your app
 !     and using the production group of your Gemfile.
在本地运行
bundle exec rake-p

 !     /tmp/build_5f6ec788/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError)
 !     from /tmp/build_5f6ec788/config/boot.rb:4:in `<top (required)>'
 !     from /tmp/build_5f6ec788/bin/rake:3:in `require_relative'
 !     from /tmp/build_5f6ec788/bin/rake:3:in `<main>'
/tmp/build_5f6ec788/config/boot.rb:4:'require'中:无法加载这样的文件--bootsnap/setup(LoadError)
!     从/tmp/build_5f6ec788/config/boot.rb:4:in`'
!     from/tmp/build_5f6ec788/bin/rake:3:in'require_relative'
!     from/tmp/build_5f6ec788/bin/rake:3:in`'
我不知道这里发生了什么

我试着用和运行这个,结果是相同的Bootsnap错误

有人能就如何让Heroku部署正常工作提出建议吗

谢谢大家!

找到了答案


我运行的是Ruby v2.6.3。升级到2.7.2并在Gemfile中修复该问题,成功部署到Heroku。

升级到Rail 6后出现同样的问题,我现在使用ruby 2.7.2