常量记录器::格式未定义(NameError)与activerecord
当我在env.rb中需要'active_record'时,我得到错误
constant Logger::Format not defined (NameError)
/usr/local/rvm/gems/ruby-1.9.3-p125@test/gems/activerecord-1.6.0/lib/active_record/support/clean_logger.rb:5:in remove_const' /usr/local/rvm/gems/ruby-1.9.3-p125@test/gems/activerecord-1.6.0/lib/active_record/support/clean_logger.rb:5:in
test / gems / activerecord-1.6.0 / lib / active_record / support / clean_logger.rb:3:在<top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p125@test/gems/activerecord-1.6.0/lib/active_record.rb:28:in
:28:在<top (required)>' /home/vijay_demo_project/bank_cucumber/features/support/env.rb:62:in
:in要求'/home/vijay_demo_project/bank_cucumber/features/support/env.rb:62:in <top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p125@test/gems/cucumber-1.2.2/lib/cucumber/rb_support/rb_language.rb:137:in
加载'/ usr /local/rvm/gems/ruby-1.9.3-p125@test/gems/cucumber-1.2.2/lib/cucumber/rb_support/rb_language.rb:137:in load_code_file' /usr/local/rvm/gems/ruby-1.9.3-p125@test/gems/cucumber-1.2.2/lib/cucumber/runtime/support_code.rb:180:in
load_code_file' /usr/local/rvm/gems/ruby-1.9.3-p125@test/gems/cucumber-1.2.2/lib/cucumber/runtime/support_code.rb:180:in
'/ load_code_file' /usr/local/rvm/gems/ruby-1.9.3-p125@test/gems/cucumber-1.2.2/lib/cucumber/runtime/support_code.rb:180:in
/local/ load_code_file' /usr/local/rvm/gems/ruby-1.9.3-p125@test/gems/cucumber-1.2.2/lib/cucumber/runtime/support_code.rb:180:in
p125@test/gems/cucumber-1.2.2/lib/cucumber/runtime/support_code.rb:83:在`block in load_files!'中
My GemFile is:
source 'http://rubygems.org'
gem 'rspec'
gem 'cucumber'
gem 'capybara'
gem 'headless'
gem 'debugger'
gem 'faker'
gem 'selenium-webdriver', '2.30.0'
gem 'mail'
gem 'database_cleaner'
gem 'rake'
gem "factory_girl"
gem 'activerecord'
gem 'faker'
gem 'logger'
和Gemfile.lock是
GEM
remote: http://rubygems.org/
specs:
activerecord (1.6.0)
activesupport (3.2.12)
i18n (~> 0.6)
multi_json (~> 1.0)
builder (3.2.0)
capybara (2.0.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 1.0.0)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
columnize (0.3.6)
cucumber (1.2.2)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.6)
multi_json (~> 1.3)
database_cleaner (1.0.1)
debugger (1.4.0)
columnize (>= 0.3.1)
debugger-linecache (~> 1.1.1)
debugger-ruby_core_source (~> 1.2.0)
debugger-linecache (1.1.2)
debugger-ruby_core_source (>= 1.1.1)
debugger-ruby_core_source (1.2.0)
diff-lcs (1.2.1)
factory_girl (4.2.0)
activesupport (>= 3.0.0)
faker (1.1.2)
i18n (~> 0.5)
ffi (1.4.0)
gherkin (2.11.6)
json (>= 1.7.6)
headless (1.0.1)
i18n (0.6.4)
json (1.7.7)
logger (1.2.8)
mail (2.5.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.21)
multi_json (1.6.1)
nokogiri (1.5.6)
polyglot (0.3.3)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rake (10.0.3)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.0)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.0)
rubyzip (0.9.9)
selenium-webdriver (2.30.0)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip
websocket (~> 1.0.4)
treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
websocket (1.0.7)
xpath (1.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
activerecord
capybara
cucumber
database_cleaner
debugger
factory_girl
faker
headless
logger
mail
rake
rspec
selenium-webdriver (= 2.30.0)
请帮助我如何解决它。 我正在使用ruby1.9.3
这里的问题activerecord (1.6.0)
所以你必须升级它最新的版本3.2.13'
使用gem 'activerecord', '~>3.2.13'
定义activerecord gem,因为存在一些依赖关系。
为了解决这个问题,你可以简单地运行“软件包更新”命令
链接地址: http://www.djcxy.com/p/38763.html上一篇: constant Logger::Format not defined (NameError) with activerecord
下一篇: uninitialized constant Gherkin::Parser::Parser (NameError)