简体   繁体   中英

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

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:

 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. 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):

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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