如何解决“未初始化的常量 Cucumber”问题错误?

发布于 2024-09-15 10:33:08 字数 3279 浏览 4 评论 0原文

我正在尝试启动并运行一个开源应用程序。

但不幸的是我收到以下错误:

rake aborted!
uninitialized constant Cucumber

我已经尝试使用以下行安装 Cucumber。下载了“.\vendor\plugins\cucumber\”文件夹,但该错误仍然存​​在。

script/plugin install git://github.com/aslakhellesoy/cucumber.git

请在堆栈跟踪下面找到:

D:\BitNami RubyStack projects\spot-us>rake db:create:all --trace
(in D:/BitNami RubyStack projects/spot-us)
rake aborted!
uninitialized constant Cucumber
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/act
ive_support/dependencies.rb:443:in `load_missing_constant'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/act
ive_support/dependencies.rb:80:in `const_missing'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/act
ive_support/dependencies.rb:92:in `const_missing'
D:/BitNami RubyStack projects/spot-us/lib/tasks/cucumber.rake:13
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1882
:in `in_namespace'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:910:
in `namespace'
D:/BitNami RubyStack projects/spot-us/lib/tasks/cucumber.rake:12
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/act
ive_support/dependencies.rb:145:in `load_without_new_constant_marking'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/act
ive_support/dependencies.rb:145:in `load'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/act
ive_support/dependencies.rb:521:in `new_constants_in'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/act
ive_support/dependencies.rb:145:in `load'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails
.rb:9
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails
.rb:9:in `each'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails
.rb:9
C:/web/BitNami_RubyStack/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
C:/web/BitNami_RubyStack/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
D:/BitNami RubyStack projects/spot-us/Rakefile:9
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383
:in `load'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383
:in `raw_load_rakefile'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017
:in `load_rakefile'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068
:in `standard_exception_handling'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016
:in `load_rakefile'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000
:in `run'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068
:in `standard_exception_handling'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998
:in `run'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/web/BitNami_RubyStack/ruby/bin/rake:19:in `load'
C:/web/BitNami_RubyStack/ruby/bin/rake:19

非常感谢任何帮助!

I'm trying to get one open source application up and running.

But unfortunately I'm getting the following error:

rake aborted!
uninitialized constant Cucumber

I have already tried installing Cucumber with the following line. That dowloaded the ".\vendor\plugins\cucumber\" folder, but that error remains the same.

script/plugin install git://github.com/aslakhellesoy/cucumber.git

Please find below the stack trace:

D:\BitNami RubyStack projects\spot-us>rake db:create:all --trace
(in D:/BitNami RubyStack projects/spot-us)
rake aborted!
uninitialized constant Cucumber
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/act
ive_support/dependencies.rb:443:in `load_missing_constant'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/act
ive_support/dependencies.rb:80:in `const_missing'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/act
ive_support/dependencies.rb:92:in `const_missing'
D:/BitNami RubyStack projects/spot-us/lib/tasks/cucumber.rake:13
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1882
:in `in_namespace'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:910:
in `namespace'
D:/BitNami RubyStack projects/spot-us/lib/tasks/cucumber.rake:12
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/act
ive_support/dependencies.rb:145:in `load_without_new_constant_marking'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/act
ive_support/dependencies.rb:145:in `load'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/act
ive_support/dependencies.rb:521:in `new_constants_in'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/act
ive_support/dependencies.rb:145:in `load'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails
.rb:9
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails
.rb:9:in `each'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails
.rb:9
C:/web/BitNami_RubyStack/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
C:/web/BitNami_RubyStack/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
D:/BitNami RubyStack projects/spot-us/Rakefile:9
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383
:in `load'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383
:in `raw_load_rakefile'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017
:in `load_rakefile'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068
:in `standard_exception_handling'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016
:in `load_rakefile'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000
:in `run'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068
:in `standard_exception_handling'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998
:in `run'
C:/web/BitNami_RubyStack/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/web/BitNami_RubyStack/ruby/bin/rake:19:in `load'
C:/web/BitNami_RubyStack/ruby/bin/rake:19

Any help is highly appreciated!

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

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

发布评论

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

评论(2

柳若烟 2024-09-22 10:33:09

不要通过脚本/插件安装 Cucumber,而是作为 gem 安装。

Don't install cucumber via script/plugin, but as gem.

允世 2024-09-22 10:33:09

我遇到了同样的问题,卸载黄瓜版本解决了该问题。

这是命令

gem卸载黄瓜-v 3.0.0.pre.1

现在我有版本“cucumber (2.4.0, 2.0.2)”并且它现在正在工作。

I was facing the same issue and uninstalled cucumber version resolved the issue.

Here is the command

gem uninstall cucumber -v 3.0.0.pre.1

Now I have version "cucumber (2.4.0, 2.0.2)" and it is working now.

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