【发布时间】:2021-02-24 16:56:09
【问题描述】:
在上面的图片中是我能找到的所有错误。我更新了 yarn、webpacks、bundler 和 ruby。老实说,不知道为什么它不起作用。我过去部署过没有问题。以下是来自 heroku 终端的错误。
remote: You may have encountered a bug in the Ruby interpreter or extension libraries.
remote: Bug reports are welcome.
remote: For details: https://www.ruby-lang.org/bugreport.html
remote:
remote: Aborted
remote:
remote: !
remote: ! Precompiling assets failed.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
###### WARNING:
There is a known bundler bug with your version of Ruby
Your version of Ruby contains a problem with the built-in integration of bundler. If
you encounter a bundler error you need to upgrade your Ruby version. We suggest you upgrade to:
2.6.6
For more information see:
https://devcenter.heroku.com/articles/bundler-version#known-upgrade-issues
###### WARNING:
Removing `Gemfile.lock` because it was generated on Windows.
Bundler will do a full resolve so native gems are handled properly.
This may result in unexpected gem versions being used in your app.
In rare occasions Bundler may not be able to resolve your dependencies at all.
https://devcenter.heroku.com/articles/bundler-windows-gemfile
-----> Installing dependencies using bundler 2.1.4
Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin bundle install -j4
Fetching https://github.com/doabit/semantic-ui-sass.git
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Preparing app for Rails asset pipeline
Running: rake assets:precompile
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has incorrect peer dependency "webpack@^4.0.0".
[4/4] Building fresh packages...
Done in 32.34s.
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has incorrect peer dependency "webpack@^4.0.0".
[4/4] Building fresh packages...
Done in 6.25s.
/tmp/build_1c2393a0/vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/lib/sassc/engine.rb:43: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]
我还删除了 gemlock 文件并重新打包。我也在使用设计 gem,当我尝试将代码发送到 heroku 时,它似乎停止了。我也在使用 CLI 并尝试了 github 部署。两者都不起作用。
【问题讨论】:
-
该错误表明您的 Ruby 版本是 2.6.1,建议将其升级到 2.6.6 以避免此已知错误。你试过吗?
-
我以为我做到了,但我必须做错什么。它不会让我从 2.6.1 更新。我在笔记本电脑上 brew 安装了新版本,但仍然显示 2.6.1 上的版本。
-
当然,但是你必须设置它,然后如果你的应用程序中有类似
.ruby-version的文件,或者可能在Gemfile中设置,你也必须更新它。您使用的是 rvm 或 rbenv 之类的东西吗?确保你也推送到 github 然后部署,否则更改不会发送到 Heroku。 -
我已经尝试过 rvm 和 rbenv。我的本地机器不会从 2.6.1 更新到其他任何 2.7.1 或 2.6.6 它说它不受支持或者它会说它已更新但是当我执行 ruby -v 它给了我 ruby 2.6.1p33 (2019- 01-30 修订版 66950) [x86_64-darwin19] 所以我无法更新我的应用程序。我现在真的不知道该怎么办
-
下载后如何设置?它不会;不只是更新,但如果它不受支持,您可能必须尝试 2.7.1。如果在 gemfile 中将其设置为 2.6.6,会发生什么?
标签: ruby-on-rails heroku deployment