Ruby:无法解析 win32 包的依赖关系
我刚刚为 Ruby 安装了 win32-clibpoard,但由于高度描述性消息 RubyGem 版本错误:win32-api(1.4.5 not >= 0)
,它无法工作。
需要帮助。
C:> gem install win32-clipboard
Successfully installed win32-clipboard-0.5.2
1 gem installed
Installing ri documentation for win32-clipboard-0.5.2...
Installing RDoc documentation for win32-clipboard-0.5.2...
c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:926:in `report_activate_error': RubyGem version error: win32-api(1.4.5 not >= 0) (Gem::LoadError)
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:244:in `activate_dep'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:236:in `activate'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:213:in `rescue in try_activate'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:210:in `try_activate'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:56:in `rescue in require'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from c:/ruby19/lib/ruby/gems/1.9.1/gems/windows-api-0.4.0/lib/windows/api.rb:1:in `<top (required)>'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require'
from c:/ruby19/lib/ruby/gems/1.9.1/gems/windows-pr-1.2.1/lib/windows/clipboard.rb:1:in `<top (required)>'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require'
from c:/ruby19/lib/ruby/gems/1.9.1/gems/win32-clipboard-0.5.2/lib/win32/clipboard.rb:1:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:33:in `require'
from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from files2tracks.rb:1:in `<main>'
I just installed win32-clibpoard for Ruby but it does not work because of a highly descriptive message RubyGem version error: win32-api(1.4.5 not >= 0)
.
Help needed.
C:> gem install win32-clipboard
Successfully installed win32-clipboard-0.5.2
1 gem installed
Installing ri documentation for win32-clipboard-0.5.2...
Installing RDoc documentation for win32-clipboard-0.5.2...
c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:926:in `report_activate_error': RubyGem version error: win32-api(1.4.5 not >= 0) (Gem::LoadError)
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:244:in `activate_dep'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:236:in `activate'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:213:in `rescue in try_activate'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:210:in `try_activate'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:56:in `rescue in require'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from c:/ruby19/lib/ruby/gems/1.9.1/gems/windows-api-0.4.0/lib/windows/api.rb:1:in `<top (required)>'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require'
from c:/ruby19/lib/ruby/gems/1.9.1/gems/windows-pr-1.2.1/lib/windows/clipboard.rb:1:in `<top (required)>'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require'
from c:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require'
from c:/ruby19/lib/ruby/gems/1.9.1/gems/win32-clipboard-0.5.2/lib/win32/clipboard.rb:1:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:33:in `require'
from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from files2tracks.rb:1:in `<main>'
您应该卸载实际的 gem win32-api,只需执行
gem uninstall win-32-api
然后继续:
1 从 http://rubyforge.org/frs/download.php/62628/win32-api-1.4.5-x86-mswin32-60.gem
2 并在本地安装:
gem install win32-api-1.4.5-x86-mswin32-60.gem
3 然后尝试:
gem 安装 win32-clipboard
You should uninstall the actual gem win32-api, just execute
gem uninstall win-32-api
and then proceed with:
1 Download the gem from http://rubyforge.org/frs/download.php/62628/win32-api-1.4.5-x86-mswin32-60.gem
2 And install it locally with:
gem install win32-api-1.4.5-x86-mswin32-60.gem
3 and then try:
gem install win32-clipboard