gpt4 book ai didi

ruby-on-rails - 运行 "bundle"时的 Bundler 警告 - Ruby on Rails

转载 作者:数据小太阳 更新时间:2023-10-29 07:24:25 25 4
gpt4 key购买 nike

我使用 rbenv 安装了 ruby 2.4.2p198(2017-09-14 修订版 59899)[x86_64-darwin16] 版本,并使用以下版本安装了 Rails Rails 5.1.4

通过 rails new my-app 创建一个新应用后

当我尝试运行 bundle 时出现以下错误

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.There was an error while trying to write to/Users/my-user/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions.It is likely that you need to grant write permissions for that path.```

最佳答案

只需从您的 Gemfile 中删除这一行

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

因为您显然不会在任何这些平台上运行您的应用程序。

然后再次运行bundle install

关于ruby-on-rails - 运行 "bundle"时的 Bundler 警告 - Ruby on Rails,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46740107/

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