我正在尝试第一次运行黄瓜,但我得到以下信息:
/opt/local/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find cucumber (>= 0) amongst [actionmailer-3.2.6, actionpack-3.2.6, activemodel-3.2.6, activerecord-3.2.6, activeresource-3.2.6, activesupport-3.2.6, arel-3.0.2, builder-3.0.0, bundler-1.1.4, coffee-rails-3.2.2, coffee-script-2.2.0, coffee-script-source-1.3.3, diff-lcs-1.1.3, erubis-2.7.0, execjs-1.4.0, hike-1.2.1, i18n-0.6.0, journey-1.0.4, jquery-rails-2.0.2, json-1.7.3, mail-2.4.4, mime-types-1.19, multi_json-1.3.6, polyglot-0.3.3, rack-1.4.1, rack-cache-1.2, rack-ssl-1.3.2, rack-test-0.6.1, rails-3.2.6, railties-3.2.6, rake-0.9.2.2, rdoc-3.12, rspec-2.10.0, rspec-core-2.10.1, rspec-expectations-2.10.0, rspec-mocks-2.10.1, rubygems-bundler-1.0.3, rvm-1.11.3.4, sass-3.1.19, sass-rails-3.2.5, sprockets-2.1.3, sqlite3-1.3.6, thor-0.15.3, tilt-1.3.3, treetop-1.4.10, tzinfo-0.3.33, uglifier-1.2.5] (Gem::LoadError)
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:1182:in `gem'
from /opt/local/bin/cucumber:18
我实际上已经使用 rvm 安装了 ruby 1.9.3,当我这样做时rvm list
,我得到了
ruby-1.9.2-p320 [ x86_64 ]
=* ruby-1.9.3-p194 [ x86_64 ]
# => - current
# =* - current && default
# * - default
Cucumber 是使用sudo gem install cucumber
.
那么,是否有一些我需要更改的黄瓜配置文件以使其指向当前使用的 ruby 版本?
我刚刚注意到我的 Rails 还说我的 ruby 环境是 1.8.7...我已经安装了 Rails 3.2.6。在检查 rvm 说我使用的是 1.9.3 之后,我肯定会创建 Rails 应用程序。也许两者都有关系?