RubyGems_Gem_版本_降级_升级_改变版本

本文探讨了使用RVM管理Ruby环境时遇到的问题,即无法直接通过RVM切换RubyGems版本。文中提供了更新RubyGems版本的具体命令,并附上了参考资料。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

目前好像还不能利用rvm来切换rubygems自己的版本,就像切换ruby和gemset那样。

所以总是要来回切换版本,尤其是两个版本共存的时候。

 

这个不兼容问题阿。。。rvm没法解决么?求指点!

 

命令:

#更新至最新版本

 

gem update --system          

#更新至指定版本例如1.3.7

gem update --system 1.3.7 

 

参考:http://www.openfoundry.org/tw/tech-column/8534-rubygems-manage-your-gems

 

 

P

P

P

+

P

P

P


└─# cd /usr/share/beef-xss bundle install Don&#39;t run Bundler as root. Installing your bundle as root will break this application for all non-root users on this machine. Fetching gem metadata from https://rubygems.org/....... Resolving dependencies... Fetching ast 2.4.3 Fetching em-websocket 0.5.3 Installing ast 2.4.3 Installing em-websocket 0.5.3 Bundler::GemNotFound: Could not find domain_name-0.6.20240107.gem for installation /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/source/rubygems.rb:178:in `install&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/installer/gem_installer.rb:55:in `install&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/installer/gem_installer.rb:17:in `install_from_spec&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/installer/parallel_installer.rb:133:in `do_install&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/installer/parallel_installer.rb:124:in `block in worker_pool&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/worker.rb:62:in `apply_func&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/worker.rb:57:in `block in process_queue&#39; <internal:kernel>:187:in `loop&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/worker.rb:54:in `process_queue&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads&#39; An error occurred while installing domain_name (0.6.20240107), and Bundler cannot continue. In Gemfile: twitter was resolved to 8.1.0, which depends on http was resolved to 5.2.0, which depends on http-cookie was resolved to 1.0.8, which depends on domain_name Bundler::GemNotFound: Could not find erubis-2.7.0.gem for installation /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/source/rubygems.rb:178:in `install&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/installer/gem_installer.rb:55:in `install&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/installer/gem_installer.rb:17:in `install_from_spec&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/installer/parallel_installer.rb:133:in `do_install&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/installer/parallel_installer.rb:124:in `block in worker_pool&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/worker.rb:62:in `apply_func&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/worker.rb:57:in `block in process_queue&#39; <internal:kernel>:187:in `loop&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/worker.rb:54:in `process_queue&#39; /var/lib/gems/3.3.0/gems/bundler-2.6.6/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads&#39; An error occurred while installing erubis (2.7.0), and Bundler cannot continue.
03-21
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值