我正在运行 Windows 7 64 位,并已通过位于 rubyinstaller.org 的 rubyinstaller 安装了 ruby,我正在尝试
require 'anygemfile'
我越来越
/dir/dir/file:#::in `require': cannot load such file -- anygemfiles (LoadError).
我可以加载交互式 ruby 并要求 'redis' => true。然而 require 'redis' 返回上述错误(s/anygemfiles/redis)。链轮也一样,撬。任何 gem 文件。
ruby -v => 1.9.3
gem -v => 1.8.16
which redis => C:\correct\directory
gem install anygem => installs gem
我正在运行的确切代码在 linux 以及其他 Windows 机器上开箱即用。
通过 rubyinstaller 重新安装 ruby 后,我现在得到:
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find redis (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
from C:/Users/Tom/workspace/ricrb/asdf.rb:1:in `<main>'