繁体   English   中英

在您的 Gemfile 中列出的任何 gem 源中找不到 gem 'nested-scaffold x86_64-linux'

[英]Could not find gem 'nested-scaffold x86_64-linux' in any of the gem sources listed in your Gemfile

在 WSL 中使用 rails 时,我在 gem 文件中添加了以下两行:
gem 'devise'
gem 'nested-scaffold'

保存了我最近创建的 rails 应用程序的 gem 文件并运行了bundle ,然后出现了这个错误,如前所述Could not find gem 'nested-scaffold x86_64-linux' in any of the gem sources listed in your Gemfile.

我尝试添加以下内容,但仍然给出相同的错误
gem 'devise'
gem 'nested-scaffold'
gem 'nested-scaffold x86_64-linux'

也试过
gem 'nested-scaffold_x86_64-linux'
但在运行bundle命令时仍然停留在上述错误

我认为您正在寻找的宝石是

gem 'nested_scaffold'

虽然它很旧,但仅适用于 rails 4.2 和 5。

我正在浏览这个网站并尝试在https://rubygems.org/gems/nested_scaffold/versions/1.1.0提到 gemfile 文本现在,我使用gem 'nested_scaffold', '~> 1.1'而不是gem 'nested_scaffold' Gemfile rest 在 gemfile 中与gem "rails", "~> 7.0.3", ">= 7.0.3.1"保持相同 & 保存 gemfile 然后运行bundle命令,

有效! 正如它所说的Bundle complete, 17 Gemfile dependencies. 80 gems now installed. Use bundle info [gemname] to see where a bundled gem is installed. Bundle complete, 17 Gemfile dependencies. 80 gems now installed. Use bundle info [gemname] to see where a bundled gem is installed. 我还检查了 rails gem 版本,它以 rails (7.0.3.1) 响应

 bundle info rails
  * rails (7.0.3.1)
        Summary: Full-stack web application framework.
        Homepage: https://rubyonrails.org
        Documentation: https://api.rubyonrails.org/v7.0.3.1/
        Source Code: https://github.com/rails/rails/tree/v7.0.3.1
        Changelog: https://github.com/rails/rails/releases/tag/v7.0.3.1
        Bug Tracker: https://github.com/rails/rails/issues
        Mailing List: https://discuss.rubyonrails.org/c/rubyonrails-talk
        Path: /home/vibhor/.rvm/gems/ruby-3.0.0/gems/rails-7.0.3.1

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM