简体   繁体   English

未定义的方法“ end_with?” “没有要加载的此类文件— Win32API”:字符串(NoMethodError)

[英]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.

相关问题 未定义的方法“ end_with?” 表示“耙中止!”:字符串(NoMethodError) - undefined method `end_with?' for “rake aborted!”:String (NoMethodError) NoMethodError:字符串的未定义方法“ permit” - NoMethodError: undefined method 'permit' for String NoMethodError未定义方法“ each”的“”:字符串 - NoMethodError undefined method 'each' for “” :String NoMethodError(“”:String的未定义方法“ permit!”): - NoMethodError (undefined method `permit!' for “ ”:String): CarrierWave抛出NoMethodError - “file”的未定义方法`new':String: - CarrierWave throws NoMethodError - undefined method `new' for “file”:String: NoMethodError:未定义的方法`find'for“Truck”:String - NoMethodError: undefined method `find' for “Truck”:String Rails - NoMethodError(未定义“reps”的方法“permit”:字符串) - Rails - NoMethodError (undefined method 'permit' for “reps”:string) Rails项目:NoMethodError:字符串的未定义方法“标识符” - Rails project: NoMethodError: undefined method `identifier' for String Android Volley Rails:NoMethodError(“”:String的未定义方法“ + @”) - Android Volley Rails: NoMethodError (undefined method `+@' for “”:String) NoMethodError 未定义的用于 `modify` 的方法 `formats`:String - NoMethodError Undefined Method `formats` for `modify`:String
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM