尽管有需要的程序,但 Rspec 和 gem 错误
Unfortunately, an unexpected error occurred, and Bundler cannot continue.
First, try this link to see if there are any existing issue reports for this error:
https://github.com/rubygems/rubygems/search?q=wrong+number+of+arguments+%28given+4%2C+expected+1%29&type=Issues
If there aren't any reports for this error yet, please fill in the new issue form located at https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md, and copy and paste the report template above in there.
我尝试运行“捆绑安装”,但收到此错误。我正在尝试为一个学校项目运行规范,测试我与 Ruby on Rails 关联等方面的情况。该项目使用 pSQL、Ruby 和 RoR。我能够运行“bundle install &&” ./setup_db.sh' 在 active_record_queries 文件夹中,但不在关联文件夹中,因为这是我收到上述评论的地方。当我只运行“bundle install”时,我收到: Your RubyGems version (2.7.6)) has a bug that Prevents required_ruby_version
for Bundler.一旦 Bundler 放弃对您的 Ruby 版本的支持,任何使用 gem install bundler 的脚本都会崩溃。请升级 RubyGems 以避免将来损坏并通过运行 gem update --system 3.2.3
消除此警告。
我还需要按照中所述在之后运行 ./setup_db.sh读我。 为什么我会收到此错误消息?
/rails1_practice
├── README.md (<- you are here)
├── active_record_queries
| └── README.md
├── associations
| └── README.md
├── migrations
| └── README.md
├── sql
| └── README.md
ace@ace-ThinkPad-T460:/$ rake 关于 rake 已中止!未找到 Rakefile (寻找:rakefile、Rakefile、rakefile.rb、Rakefile.rb)
ace@ace-ThinkPad-T460:/$ rake 关于 rake 已中止!未找到 Rakefile (寻找:rakefile、Rakefile、rakefile.rb、Rakefile.rb)
(通过使用 --trace 运行任务查看完整跟踪) ace@ace-ThinkPad-T460:/$ Rails -v Rails 7.0.2.2 ace@ace-ThinkPad-T460:/$ ruby -v ruby 3.1.1p18 (2022-02-18 修订版 53f5fc4236) [x86_64-linux] ace@ace-ThinkPad-T460:/$ rbenv -v rbenv 1.2.0-11-ge4f61e6 ace@ace-ThinkPad-T460:/$ gem -v 3.3.7 ''' ace@ace-ThinkPad-T460:~/Desktop/codes/完全正确!/rails1-practice/associations$ ./setup_db.sh 您的 RubyGems 版本 (2.7.6) 有一个错误,导致
required_ruby_version
无法用于 Bundler。一旦 Bundler 放弃对您的 Ruby 版本的支持,任何使用 gem install bundler 的脚本都会崩溃。请升级 RubyGems 以避免将来损坏并通过运行gem update --system 3.2.3
消除此警告 在本地安装的 gem 中找不到 gem 'rails (>= 5.2.4.1, ~> 5.2.4)'。 运行bundle install
来安装缺少的gems。 您的 RubyGems 版本 (2.7.6) 有一个错误,导致required_ruby_version
无法用于 Bundler。一旦 Bundler 放弃对您的 Ruby 版本的支持,任何使用 gem install bundler 的脚本都会崩溃。请升级 RubyGems 以避免将来损坏并通过运行gem update --system 3.2.3
消除此警告 在本地安装的 gem 中找不到 gem 'rails (>= 5.2.4.1, ~> 5.2.4)'。 运行bundle install
来安装缺少的gems。 您的 RubyGems 版本 (2.7.6) 有一个错误,导致required_ruby_version
无法用于 Bundler。一旦 Bundler 放弃对您的 Ruby 版本的支持,任何使用 gem install bundler 的脚本都会中断。请升级 RubyGems 以避免将来损坏并通过运行gem update --system 3.2.3
消除此警告 在本地安装的 gem 中找不到 gem 'rails (>= 5.2.4.1, ~> 5.2.4)'。 运行bundle install
来安装缺少的gems。 您的 RubyGems 版本 (2.7.6) 有一个错误,导致required_ruby_version
无法用于 Bundler。一旦 Bundler 放弃对您的 Ruby 版本的支持,任何使用 gem install bundler 的脚本都会崩溃。请升级 RubyGems 以避免将来损坏并通过运行gem update --system 3.2.3
消除此警告 在本地安装的 gem 中找不到 gem 'rails (>= 5.2.4.1, ~> 5.2.4)'。 运行bundle install
来安装缺少的gems。 您的 RubyGems 版本 (2.7.6) 有一个错误,导致required_ruby_version
无法用于 Bundler。一旦 Bundler 放弃对您的 Ruby 版本的支持,任何使用 gem install bundler 的脚本都会崩溃。请升级 RubyGems 以避免将来损坏并通过运行gem update --system 3.2.3
消除此警告 在本地安装的 gem 中找不到 gem 'rails (>= 5.2.4.1, ~> 5.2.4)'。 运行bundle install
来安装缺少的gems。 您的 RubyGems 版本 (2.7.6) 有一个错误,导致required_ruby_version
无法用于 Bundler。一旦 Bundler 放弃对您的 Ruby 版本的支持,任何使用 gem install bundler 的脚本都会崩溃。请升级 RubyGems 以避免将来损坏并通过运行gem update --system 3.2.3
消除此警告 在本地安装的 gem 中找不到 gem 'rails (>= 5.2.4.1, ~> 5.2.4)'。 运行bundle install
来安装缺少的gems。 您的 RubyGems 版本 (2.7.6) 有一个错误,导致required_ruby_version
无法用于 Bundler。一旦 Bundler 放弃对您的 Ruby 版本的支持,任何使用 gem install bundler 的脚本都会中断。请升级 RubyGems 以避免将来损坏并通过运行gem update --system 3.2.3
消除此警告 在本地安装的 gem 中找不到 gem 'rails (>= 5.2.4.1, ~> 5.2.4)'。 运行bundle install
来安装缺少的gems。 ace@ace-ThinkPad-T460:~/Desktop/codes/正是!/rails1-practice/associations$ gem update --systemn 3.2.3 无法加载 /home/ace/.gemrc,参数数量错误(给定 2,预期 1) 错误:执行 gem 时...(OptionParser::InvalidOption) 无效选项:--systemn ace@ace-ThinkPad-T460:~/Desktop/codes/正是!/rails1-practice/associations$ gem 更新系统 无法加载 /home/ace/.gemrc,参数数量错误(给定 2,预期 1) 更新已安装的 gem 没有什么可更新的 '''
Unfortunately, an unexpected error occurred, and Bundler cannot continue.
First, try this link to see if there are any existing issue reports for this error:
https://github.com/rubygems/rubygems/search?q=wrong+number+of+arguments+%28given+4%2C+expected+1%29&type=Issues
If there aren't any reports for this error yet, please fill in the new issue form located at https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md, and copy and paste the report template above in there.
I try to run 'bundle install' and I get this error. I am trying to run specs for a school project testing me on Ruby on Rails associations among other things. The project uses pSQL, Ruby and RoR. I am able to run 'bundle install && ./setup_db.sh' in the active_record_queries folder but not in the associations folder for that is where I receive the above comment. When I run just 'bundle install' I receive: Your RubyGems version (2.7.6)) has a bug that prevents required_ruby_version
from working for Bundler. Any scripts that use gem install bundler
will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running gem update --system 3.2.3
I also need to run ./setup_db.sh after as stated in the read me.
Why am I getting this error message?
/rails1_practice
├── README.md (<- you are here)
├── active_record_queries
| └── README.md
├── associations
| └── README.md
├── migrations
| └── README.md
├── sql
| └── README.md
ace@ace-ThinkPad-T460:/$ rake about rake aborted! No Rakefile found
(looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)ace@ace-ThinkPad-T460:/$ rake about rake aborted! No Rakefile found
(looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)(See full trace by running task with --trace) ace@ace-ThinkPad-T460:/$
rails -v Rails 7.0.2.2 ace@ace-ThinkPad-T460:/$ ruby -v ruby 3.1.1p18
(2022-02-18 revision 53f5fc4236) [x86_64-linux]
ace@ace-ThinkPad-T460:/$ rbenv -v rbenv 1.2.0-11-ge4f61e6
ace@ace-ThinkPad-T460:/$ gem -v
3.3.7
'''
ace@ace-ThinkPad-T460:~/Desktop/codes/exactly!/rails1-practice/associations$ ./setup_db.sh
Your RubyGems version (2.7.6)) has a bug that preventsrequired_ruby_version
from working for Bundler. Any scripts that usegem install bundler
will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by runninggem update --system 3.2.3
Could not find gem 'rails (>= 5.2.4.1, ~> 5.2.4)' in locally installed gems.
Runbundle install
to install missing gems.
Your RubyGems version (2.7.6)) has a bug that preventsrequired_ruby_version
from working for Bundler. Any scripts that usegem install bundler
will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by runninggem update --system 3.2.3
Could not find gem 'rails (>= 5.2.4.1, ~> 5.2.4)' in locally installed gems.
Runbundle install
to install missing gems.
Your RubyGems version (2.7.6)) has a bug that preventsrequired_ruby_version
from working for Bundler. Any scripts that usegem install bundler
will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by runninggem update --system 3.2.3
Could not find gem 'rails (>= 5.2.4.1, ~> 5.2.4)' in locally installed gems.
Runbundle install
to install missing gems.
Your RubyGems version (2.7.6)) has a bug that preventsrequired_ruby_version
from working for Bundler. Any scripts that usegem install bundler
will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by runninggem update --system 3.2.3
Could not find gem 'rails (>= 5.2.4.1, ~> 5.2.4)' in locally installed gems.
Runbundle install
to install missing gems.
Your RubyGems version (2.7.6)) has a bug that preventsrequired_ruby_version
from working for Bundler. Any scripts that usegem install bundler
will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by runninggem update --system 3.2.3
Could not find gem 'rails (>= 5.2.4.1, ~> 5.2.4)' in locally installed gems.
Runbundle install
to install missing gems.
Your RubyGems version (2.7.6)) has a bug that preventsrequired_ruby_version
from working for Bundler. Any scripts that usegem install bundler
will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by runninggem update --system 3.2.3
Could not find gem 'rails (>= 5.2.4.1, ~> 5.2.4)' in locally installed gems.
Runbundle install
to install missing gems.
Your RubyGems version (2.7.6)) has a bug that preventsrequired_ruby_version
from working for Bundler. Any scripts that usegem install bundler
will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by runninggem update --system 3.2.3
Could not find gem 'rails (>= 5.2.4.1, ~> 5.2.4)' in locally installed gems.
Runbundle install
to install missing gems.
ace@ace-ThinkPad-T460:~/Desktop/codes/exactly!/rails1-practice/associations$ gem update --systemn 3.2.3
Failed to load /home/ace/.gemrc, wrong number of arguments (given 2, expected 1)
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --systemn
ace@ace-ThinkPad-T460:~/Desktop/codes/exactly!/rails1-practice/associations$ gem update system
Failed to load /home/ace/.gemrc, wrong number of arguments (given 2, expected 1)
Updating installed gems
Nothing to update
'''
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论