我在 ubuntu 11.10 中使用 rails 应用程序。我尝试使用此命令安装 fnordmetric gem
sudo gem install fnordmetric
在安装时在控制台中显示如下
Fetching: bson-1.8.2.gem (100%)
Successfully installed fnordmetric-1.0.0
Successfully installed bson-1.8.2
2 gems installed
Installing ri documentation for fnordmetric-1.0.0...
Installing ri documentation for bson-1.8.2...
Installing RDoc documentation for fnordmetric-1.0.0...
Installing RDoc documentation for bson-1.8.2...
我在我的 gem 文件中包含 fnordmetric gem 作为
gem 'fnordmetric'
在那之后我做了
sudo bundle install
Gem 已安装,但在 gem 列表中 fnordmetric gem 未显示。我在执行脚本/服务器时收到此错误。
Invalid gemspec in [/usr/local/lib/ruby/gems/1.8/specifications/fnordmetric-1.0.0.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0xc821cb4> 0.4.0"]
Invalid gemspec in [/home/paddu/Documents/fnordmetric/ts-delayed-delta/ruby/1.8/specifications/fnordmetric-1.0.0.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x9569204> 0.4.0"]
Invalid gemspec in [/home/paddu/Documents/fnordmetric/ts-delayed-delta/ruby/1.8/specifications/fnordmetric-1.0.0.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x9569204> 0.4.0"]
/home/paddu/Documents/fnordmetric/config/../config/preinitializer.rb:18: Bundler couldn't find some gems.Did you run `bundle install`? (RuntimeError)
from /home/paddu/Documents/fnordmetric/config/boot.rb:28:in `load'
from /home/paddu/Documents/fnordmetric/config/boot.rb:28:in `preinitialize'
from /home/paddu/Documents/fnordmetric/config/boot.rb:10:in `boot!'
from /home/paddu/Documents/fnordmetric/config/boot.rb:122
from script/server:2:in `require'
from script/server:2
任何人都可以建议如何解决这个问题。提前致谢