gpt4 book ai didi

ruby-on-rails - 运行 bundle install 时导致未定义方法 `dir_mode=' 的原因

转载 作者:行者123 更新时间:2023-12-05 03:45:05 24 4
gpt4 key购买 nike

我重新访问了一个 2 个月未动过的 Rails 4.2.11.1 应用程序。该应用程序使用 CircleCI 进行部署。之前,当触发构建时,没有任何问题。在这两个月中,代码没有发生任何变化。触发构建并运行 bundle install --deployment --path vendor/bundle 时,返回以下错误:

#!/bin/bash -eo pipefail
bundle install --deployment --path vendor/bundle
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
/gems/gems/bundler-1.12.5/lib/bundler/rubygems_integration.rb:152: warning: constant Gem::ConfigMap is deprecated
Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Installing rake 12.3.3

NoMethodError: undefined method `dir_mode=' for "/root/repo/vendor/bundle/ruby/2.3.0/cache/rake-12.3.3.gem":String
Installing CFPropertyList 2.3.6

NoMethodError: undefined method `dir_mode=' for #<String:0x007f3a884a9100>
Installing i18n 0.8.6

NoMethodError: undefined method `dir_mode=' for "/root/repo/vendor/bundle/ruby/2.3.0/cache/i18n-0.8.6.gem":String
Installing minitest 5.14.3

NoMethodError: undefined method `dir_mode=' for "/root/repo/vendor/bundle/ruby/2.3.0/cache/minitest-5.14.3.gem":String
Installing thread_safe 0.3.6

NoMethodError: undefined method `dir_mode=' for "/root/repo/vendor/bundle/ruby/2.3.0/cache/thread_safe-0.3.6.gem":String
Installing builder 3.2.4

NoMethodError: undefined method `dir_mode=' for "/root/repo/vendor/bundle/ruby/2.3.0/cache/builder-3.2.4.gem":String
Installing erubis 2.7.0

NoMethodError: undefined method `dir_mode=' for "/root/repo/vendor/bundle/ruby/2.3.0/cache/erubis-2.7.0.gem":String
Installing mini_portile2 2.4.0

NoMethodError: undefined method `dir_mode=' for #<String:0x007f3aa040ce78>
Installing crass 1.0.6

NoMethodError: undefined method `dir_mode=' for "/root/repo/vendor/bundle/ruby/2.3.0/cache/crass-1.0.6.gem":String
Installing rack 1.6.13

NoMethodError: undefined method `dir_mode=' for "/root/repo/vendor/bundle/ruby/2.3.0/cache/zonebie-0.6.1.gem":String
An error occurred while installing rake (12.3.3), and Bundler cannot continue.
Make sure that `gem install rake -v '12.3.3'` succeeds before bundling.

Exited with code exit status 5
CircleCI received exit code 5

我不知道是什么导致了 NoMethodError 的问题。 Trieg 搜索 dir_mode= 方法但无济于事。我真的很感激任何关于如何摆脱这个问题的提示。提前致谢!

最佳答案

我之前也遇到过同样的问题。 bundle 更新--bundler似乎是为我修复它的原因。

关于ruby-on-rails - 运行 bundle install 时导致未定义方法 `dir_mode=' 的原因,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66110828/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com