找不到“黄瓜”;带 Rails 2.3.8 的生成器

发布于 2024-11-29 05:03:49 字数 4785 浏览 0 评论 0原文

当我尝试在 Rails 项目中运行 Cucumber 时,出现此错误。

我尝试运行

ruby script/generate cucumber

,但收到​​错误,

Couldn't find 'cucumber' generator

我进行了很多搜索,但没有找到任何有效的解决方案。以下是我的配置

rails version 2.3.8

Bundler version 1.0.15

GemFile

source "http://rubygems.org"
gem "bundler"
gem "rails", "= 2.3.8"
gem "i18n", "= 0.4.1"
gem "mysql"
gem 'delayed_job', '= 2.0.3'
gem 'daemons', '= 1.0.10'
gem "bundler"
gem "warden"
gem "warden_oauth"
gem "json"
gem 'haml'
gem "savon", "= 0.8.3"
gem "crack", "= 0.1.8"
gem "httpi", "= 0.7.8"
gem "gyoku", "= 0.2.0"

gem "soap4r"

gem "test-unit"
gem "cancan"
gem "color-logger", '>=0.0.3'
gem "searchlogic"

gem "formtastic", "= 1.1.0"
gem "faker", "= 0.3.1"
gem "populator"
gem "hoptoad_notifier"

gem 'builder', '~> 2.1.2'
gem 'rspec', '~> 1.3.0'
gem 'rspec-rails', '~> 1.3.2'
gem 'gherkin', '~> 2.1.4'
gem 'cucumber', '~> 0.8.5'
gem 'cucumber-rails', '~> 0.3.2'
gem 'capybara', '~> 0.4.0'
gem 'database_cleaner', '~> 0.6.0'



source "http://gems.github.com"
gem "mislav-will_paginate", "~> 2.3.11"

gem "fastercsv"
gem "spreadsheet" 
gem "logging"

以下是我的整个 gem 列表

abstract (1.0.0)
actionmailer (3.0.9, 3.0.1, 3.0.0, 2.3.8)
actionpack (3.0.9, 3.0.1, 3.0.0, 2.3.8)
activemodel (3.0.9, 3.0.1, 3.0.0)
activerecord (3.0.9, 3.0.1, 3.0.0, 2.3.8)
activeresource (3.0.9, 3.0.1, 3.0.0, 2.3.8)
activesupport (3.0.9, 3.0.1, 3.0.0, 2.3.8)
addressable (2.2.6)
annotate (2.4.0)
arel (2.0.10, 1.0.1)
authlogic (2.1.6)
autotest-growl (0.2.9, 0.2.6)
bcrypt-ruby (2.1.2)
builder (3.0.0, 2.1.2)
bundler (1.0.15)
cancan (1.6.5, 1.5.1, 1.4.1)
capistrano (2.5.19)
capistrano-ext (1.2.1)
capybara (1.0.0, 0.4.1.2, 0.4.0)
celerity (0.8.9, 0.8.8, 0.8.2)
cgi_multipart_eof_fix (2.5.0)
childprocess (0.2.0, 0.1.7, 0.1.3)
ci_reporter (1.6.4)
color-logger (0.0.3)
colored (1.2)
columnize (0.3.2)
configuration (1.2.0)
crack (0.1.8)
cucumber (1.0.2, 0.10.0, 0.9.3, 0.8.7)
cucumber-rails (1.0.2, 0.3.2)
culerity (0.2.15, 0.2.12)
daemon_controller (0.2.6)
daemons (1.1.0, 1.0.10)
database_cleaner (0.6.7, 0.6.0)
delayed_job (2.0.3)
devise (1.1.7, 1.1.3)
diff-lcs (1.1.2)
differ (0.1.2)
erubis (2.7.0, 2.6.6)
factory_girl (1.3.3, 1.3.2)
factory_girl_rails (1.0.1)
faker (0.9.5, 0.3.1)
fakeweb (1.3.0)
fastercsv (1.5.4, 1.5.3)
fastthread (1.0.7)
ffi (1.0.9, 0.6.3)
formtastic (1.1.0)
gem_plugin (0.2.3)
gherkin (2.4.6, 2.4.5, 2.3.3, 2.2.9, 2.1.5)
guid (0.1.1)
gyoku (0.2.0)
haml (3.1.2, 3.0.25, 3.0.23)
haml-rails (0.3.4)
has_scope (0.5.0)
highline (1.6.1)
hoe (2.8.0)
hoptoad_notifier (2.4.11, 2.4.9, 2.4.6, 2.3.12)
hpricot (0.8.3)
httpclient (2.2.1, 2.1.6.1)
httpi (0.7.8)
i18n (0.5.0, 0.4.2, 0.4.1)
inherited_resources (1.1.2)
jquery-rails (0.2.7, 0.2.5)
json (1.5.3, 1.5.2, 1.4.6)
json_pure (1.5.3, 1.5.1, 1.4.6)
launchy (2.0.5, 0.3.7)
lazy_high_charts (1.1.1)
linecache (0.43)
little-plugger (1.1.2)
logging (1.5.2)
machinist (2.0.0.beta2)
mail (2.2.19, 2.2.15, 2.2.9)
meta_search (0.9.8)
mime-types (1.16)
mislav-will_paginate (2.3.11)
mocha (0.9.12)
mongrel (1.1.5)
mysql (2.8.1)
mysql2 (0.2.11, 0.2.6)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.1.0, 2.0.23)
net-ssh-gateway (1.0.1)
nifty-generators (0.4.6)
nokogiri (1.5.0, 1.4.4, 1.4.3.1)
oauth (0.4.5, 0.4.4)
paper_trail (2.0.0)
paperclip (2.3.8, 2.3.5)
passenger (3.0.7)
polyglot (0.3.2, 0.3.1)
populator (1.0.0, 0.2.5)
rack (1.2.3, 1.2.1, 1.1.2, 1.1.0)
rack-mount (0.6.14, 0.6.13)
rack-test (0.6.1, 0.5.7, 0.5.6)
rails (3.0.9, 3.0.1, 3.0.0, 2.3.8)
rails3-generators (0.17.4, 0.14.0)
rails3-jquery-autocomplete (0.6.6)
rails3_acts_as_paranoid (0.0.4)
rails_best_practices (0.9.0)
railties (3.0.9, 3.0.1, 3.0.0)
rake (0.9.2, 0.8.7)
rcov (0.9.9)
rdoc (3.9.1)
responders (0.6.2)
rspec (2.6.0, 2.5.0, 2.1.0, 2.0.1, 1.3.2)
rspec-core (2.6.4, 2.5.1, 2.1.0, 2.0.1)
rspec-expectations (2.6.0, 2.5.0, 2.1.0, 2.0.1)
rspec-mocks (2.6.0, 2.5.0, 2.1.0, 2.0.1)
rspec-rails (2.6.1, 2.5.0, 2.1.0, 2.0.1, 1.3.4)
ruby-debug (0.10.4)
ruby-debug-base (0.10.4)
ruby-ole (1.2.11.1)
ruby-progressbar (0.0.10)
ruby_parser (2.0.6, 2.0.5)
rubyzip (0.9.4)
savon (0.8.3)
searchlogic (2.4.28, 2.4.27)
selenium-webdriver (2.3.2, 0.2.2, 0.1.3, 0.0.29)
sexp_processor (3.0.5)
shoulda (2.11.3)
show_for (0.2.4, 0.2.3)
simple_form (1.3.1, 1.2.2)
soap4r (1.5.8)
spork (0.8.5, 0.8.4)
spreadsheet (0.6.5.7, 0.6.5.5)
sqlite3 (1.3.4)
term-ansicolor (1.0.6, 1.0.5)
test-unit (2.3.1, 2.3.0, 1.2.3)
thor (0.14.6, 0.14.4)
treetop (1.4.10, 1.4.9, 1.4.8)
trollop (1.16.2)
tzinfo (0.3.29, 0.3.24, 0.3.23)
warden (1.0.5, 1.0.4, 1.0.3, 0.10.7)
warden_oauth (0.1.1)
web-app-theme (0.6.3, 0.6.2)
will_paginate (3.0.pre2, 2.3.15)
xpath (0.1.4, 0.1.3, 0.1.2)
yajl-ruby (0.8.2)
ZenTest (4.5.0, 4.4.0)

When I try to run cucumber in my Rails project I'm getting this error.

I tried to run

ruby script/generate cucumber

and I'm getting the error

Couldn't find 'cucumber' generator

I have search a lot and didn't find any working solution. Following are my configs

rails version 2.3.8

Bundler version 1.0.15

GemFile

source "http://rubygems.org"
gem "bundler"
gem "rails", "= 2.3.8"
gem "i18n", "= 0.4.1"
gem "mysql"
gem 'delayed_job', '= 2.0.3'
gem 'daemons', '= 1.0.10'
gem "bundler"
gem "warden"
gem "warden_oauth"
gem "json"
gem 'haml'
gem "savon", "= 0.8.3"
gem "crack", "= 0.1.8"
gem "httpi", "= 0.7.8"
gem "gyoku", "= 0.2.0"

gem "soap4r"

gem "test-unit"
gem "cancan"
gem "color-logger", '>=0.0.3'
gem "searchlogic"

gem "formtastic", "= 1.1.0"
gem "faker", "= 0.3.1"
gem "populator"
gem "hoptoad_notifier"

gem 'builder', '~> 2.1.2'
gem 'rspec', '~> 1.3.0'
gem 'rspec-rails', '~> 1.3.2'
gem 'gherkin', '~> 2.1.4'
gem 'cucumber', '~> 0.8.5'
gem 'cucumber-rails', '~> 0.3.2'
gem 'capybara', '~> 0.4.0'
gem 'database_cleaner', '~> 0.6.0'



source "http://gems.github.com"
gem "mislav-will_paginate", "~> 2.3.11"

gem "fastercsv"
gem "spreadsheet" 
gem "logging"

The following is my entire gem list

abstract (1.0.0)
actionmailer (3.0.9, 3.0.1, 3.0.0, 2.3.8)
actionpack (3.0.9, 3.0.1, 3.0.0, 2.3.8)
activemodel (3.0.9, 3.0.1, 3.0.0)
activerecord (3.0.9, 3.0.1, 3.0.0, 2.3.8)
activeresource (3.0.9, 3.0.1, 3.0.0, 2.3.8)
activesupport (3.0.9, 3.0.1, 3.0.0, 2.3.8)
addressable (2.2.6)
annotate (2.4.0)
arel (2.0.10, 1.0.1)
authlogic (2.1.6)
autotest-growl (0.2.9, 0.2.6)
bcrypt-ruby (2.1.2)
builder (3.0.0, 2.1.2)
bundler (1.0.15)
cancan (1.6.5, 1.5.1, 1.4.1)
capistrano (2.5.19)
capistrano-ext (1.2.1)
capybara (1.0.0, 0.4.1.2, 0.4.0)
celerity (0.8.9, 0.8.8, 0.8.2)
cgi_multipart_eof_fix (2.5.0)
childprocess (0.2.0, 0.1.7, 0.1.3)
ci_reporter (1.6.4)
color-logger (0.0.3)
colored (1.2)
columnize (0.3.2)
configuration (1.2.0)
crack (0.1.8)
cucumber (1.0.2, 0.10.0, 0.9.3, 0.8.7)
cucumber-rails (1.0.2, 0.3.2)
culerity (0.2.15, 0.2.12)
daemon_controller (0.2.6)
daemons (1.1.0, 1.0.10)
database_cleaner (0.6.7, 0.6.0)
delayed_job (2.0.3)
devise (1.1.7, 1.1.3)
diff-lcs (1.1.2)
differ (0.1.2)
erubis (2.7.0, 2.6.6)
factory_girl (1.3.3, 1.3.2)
factory_girl_rails (1.0.1)
faker (0.9.5, 0.3.1)
fakeweb (1.3.0)
fastercsv (1.5.4, 1.5.3)
fastthread (1.0.7)
ffi (1.0.9, 0.6.3)
formtastic (1.1.0)
gem_plugin (0.2.3)
gherkin (2.4.6, 2.4.5, 2.3.3, 2.2.9, 2.1.5)
guid (0.1.1)
gyoku (0.2.0)
haml (3.1.2, 3.0.25, 3.0.23)
haml-rails (0.3.4)
has_scope (0.5.0)
highline (1.6.1)
hoe (2.8.0)
hoptoad_notifier (2.4.11, 2.4.9, 2.4.6, 2.3.12)
hpricot (0.8.3)
httpclient (2.2.1, 2.1.6.1)
httpi (0.7.8)
i18n (0.5.0, 0.4.2, 0.4.1)
inherited_resources (1.1.2)
jquery-rails (0.2.7, 0.2.5)
json (1.5.3, 1.5.2, 1.4.6)
json_pure (1.5.3, 1.5.1, 1.4.6)
launchy (2.0.5, 0.3.7)
lazy_high_charts (1.1.1)
linecache (0.43)
little-plugger (1.1.2)
logging (1.5.2)
machinist (2.0.0.beta2)
mail (2.2.19, 2.2.15, 2.2.9)
meta_search (0.9.8)
mime-types (1.16)
mislav-will_paginate (2.3.11)
mocha (0.9.12)
mongrel (1.1.5)
mysql (2.8.1)
mysql2 (0.2.11, 0.2.6)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.1.0, 2.0.23)
net-ssh-gateway (1.0.1)
nifty-generators (0.4.6)
nokogiri (1.5.0, 1.4.4, 1.4.3.1)
oauth (0.4.5, 0.4.4)
paper_trail (2.0.0)
paperclip (2.3.8, 2.3.5)
passenger (3.0.7)
polyglot (0.3.2, 0.3.1)
populator (1.0.0, 0.2.5)
rack (1.2.3, 1.2.1, 1.1.2, 1.1.0)
rack-mount (0.6.14, 0.6.13)
rack-test (0.6.1, 0.5.7, 0.5.6)
rails (3.0.9, 3.0.1, 3.0.0, 2.3.8)
rails3-generators (0.17.4, 0.14.0)
rails3-jquery-autocomplete (0.6.6)
rails3_acts_as_paranoid (0.0.4)
rails_best_practices (0.9.0)
railties (3.0.9, 3.0.1, 3.0.0)
rake (0.9.2, 0.8.7)
rcov (0.9.9)
rdoc (3.9.1)
responders (0.6.2)
rspec (2.6.0, 2.5.0, 2.1.0, 2.0.1, 1.3.2)
rspec-core (2.6.4, 2.5.1, 2.1.0, 2.0.1)
rspec-expectations (2.6.0, 2.5.0, 2.1.0, 2.0.1)
rspec-mocks (2.6.0, 2.5.0, 2.1.0, 2.0.1)
rspec-rails (2.6.1, 2.5.0, 2.1.0, 2.0.1, 1.3.4)
ruby-debug (0.10.4)
ruby-debug-base (0.10.4)
ruby-ole (1.2.11.1)
ruby-progressbar (0.0.10)
ruby_parser (2.0.6, 2.0.5)
rubyzip (0.9.4)
savon (0.8.3)
searchlogic (2.4.28, 2.4.27)
selenium-webdriver (2.3.2, 0.2.2, 0.1.3, 0.0.29)
sexp_processor (3.0.5)
shoulda (2.11.3)
show_for (0.2.4, 0.2.3)
simple_form (1.3.1, 1.2.2)
soap4r (1.5.8)
spork (0.8.5, 0.8.4)
spreadsheet (0.6.5.7, 0.6.5.5)
sqlite3 (1.3.4)
term-ansicolor (1.0.6, 1.0.5)
test-unit (2.3.1, 2.3.0, 1.2.3)
thor (0.14.6, 0.14.4)
treetop (1.4.10, 1.4.9, 1.4.8)
trollop (1.16.2)
tzinfo (0.3.29, 0.3.24, 0.3.23)
warden (1.0.5, 1.0.4, 1.0.3, 0.10.7)
warden_oauth (0.1.1)
web-app-theme (0.6.3, 0.6.2)
will_paginate (3.0.pre2, 2.3.15)
xpath (0.1.4, 0.1.3, 0.1.2)
yajl-ruby (0.8.2)
ZenTest (4.5.0, 4.4.0)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

聽兲甴掵 2024-12-06 05:03:49

根据你的宝石列表,你有很多黄瓜版本。您可能首先要确保您运行的是正确的黄瓜。

以下是一些建议:
- 如果您没有使用rvm,我建议您这样做,因为您可以在那里为您的项目隔离某个黄瓜版本(假设您正在处理需要黄瓜的其他项目)
- 如果您已经是,我建议您卸载所有 Cucumber 版本并进行另一个捆绑安装,它现在应该为您提供正确的版本

According to your gem list, you have a lot of cucumber versions. You might want first to ensure you are running the correct cucumber.

Here are some suggestions:
- if you arent using rvm, i suggest you do since you can isolate a certain cucumber version for your project there(assuming you are working on other projects that require cucumber)
- if you already are, i suggest you uninstall all your cucumber versions and do another bundle install, it should give you the correct version now

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文