[英]Undefined method `end_with?' for “no such file to load — Win32API”:String (NoMethodError)
I'm just setting up a new server and want to install the Twitter gem but am running into problems on Ubuntu 8.04/Ruby 1.8.6 我只是设置一个新服务器,并想安装Twitter gem,但是在Ubuntu 8.04 / Ruby 1.8.6上遇到了问题
It says that "multi_json requires RubyGems >= 1.3.6", but running "gem update --system" obviously tries and updates to RubyGems 1.5 which can't be done on Ruby 1.8.6 and fails with the following error: 它说“ multi_json需要RubyGems> = 1.3.6”,但是运行“ gem update --system”显然会尝试并更新到RubyGems 1.5,而这在Ruby 1.8.6上是无法完成的,并失败并显示以下错误:
undefined method `end_with?' for "no such file to load -- Win32API":String (NoMethodError)
from ./lib/rubygems/config_file.rb:55
from ./lib/rubygems/custom_require.rb:29:in 'gem_original_require'
from ./lib/rubygems/custom_require.rb:29:in 'require'
...
Any ideas? 有任何想法吗?
Thanks 谢谢
Steve 史蒂夫
The upgrade documentation mentions that you can use the following command to downgrade the gems. 升级文档提到您可以使用以下命令降级gem。 Suffice to say that it probably works for upgrading to a specific version as well:
足以说它也可能适用于升级到特定版本:
gem update --system 1.3.7
In the light of the comment I just received you could also try to install an older gem your self. 根据我刚刚收到的评论,您还可以尝试自行安装较旧的宝石。
For example (using root / sudo): 例如(使用root / sudo):
cd /usr/src && wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar -xvf rubygems-1.3.7.tgz
ruby setup.rb
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.