如何解决“未初始化的常量 Cucumber”问题错误?
我正在尝试启动并运行一个开源应用程序。
但不幸的是我收到以下错误:
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不要通过脚本/插件安装 Cucumber,而是作为 gem 安装。
Don't install cucumber via script/plugin, but as gem.
我遇到了同样的问题,卸载黄瓜版本解决了该问题。
这是命令
现在我有版本“cucumber (2.4.0, 2.0.2)”并且它现在正在工作。
I was facing the same issue and uninstalled cucumber version resolved the issue.
Here is the command
Now I have version "cucumber (2.4.0, 2.0.2)" and it is working now.