我正在嘗試使用remarkable_activerecord-4.0.0.alpha4
和rspec-2.7.1
和rails-3.0.7
。到目前爲止,我還沒有用過任何例子。我剛剛將它添加到Gemfile並做了一個bundle install
。我正在使用spork加載應用程序。當我運行叉勺,我得到以下錯誤:未定義的方法`alias_example_to'for RSpec :: Core :: ExampleGroup:Class
undefined method `alias_example_to' for RSpec::Core::ExampleGroup:Class (NoMethodError)
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/remarkable-4.0.0.alpha4/lib/remarkable/core/rspec.rb:26:in `<class:ExampleGroup>'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/remarkable-4.0.0.alpha4/lib/remarkable/core/rspec.rb:13:in `<module:Core>'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/remarkable-4.0.0.alpha4/lib/remarkable/core/rspec.rb:12:in `<module:RSpec>'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/remarkable-4.0.0.alpha4/lib/remarkable/core/rspec.rb:1:in `<top (required)>'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `block in require'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in `new_constants_in'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/remarkable-4.0.0.alpha4/lib/remarkable/core.rb:11:in `<top (required)>'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `block in require'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in `new_constants_in'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/remarkable_activemodel-4.0.0.alpha4/lib/remarkable/active_model.rb:2:in `<top (required)>'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `block in require'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in `new_constants_in'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/remarkable_activerecord-4.0.0.alpha4/lib/remarkable/active_record.rb:2:in `<top (required)>'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `block in require'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in `new_constants_in'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
/home/chandranshu/work/pep/data_entry/branches/ws_chan_r2_test_cases/spec/spec_helper.rb:4:in `<top (required)>'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:235:in `load'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:235:in `block in load'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in `new_constants_in'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:235:in `load'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/test_framework.rb:138:in `block (2 levels) in preload'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/app_framework/rails.rb:8:in `preload'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/test_framework.rb:134:in `block in preload'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork.rb:62:in `exec_prefork'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/test_framework.rb:120:in `preload'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/run_strategy/forking.rb:25:in `preload'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/runner.rb:74:in `run'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/lib/spork/runner.rb:10:in `run'
/opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/spork-0.9.0.rc9/bin/spork:10:in `<top (required)>'
/opt/ruby-1.9.2-p180/bin/spork:19:in `load'
/opt/ruby-1.9.2-p180/bin/spork:19:in `<main>'
我都對着RSpec::Core::ExampleGroup
和alias_example_to
方法是目前。我應該如何去調試呢?
更新
閱讀相關文章後,我編輯有問題的文件顯式地加載rspec的,它開始工作的罰款。立即,我意識到我的spec_helper中的require 'rspec/rails'
和require 'remarkable/active_record'
語句的順序是錯誤的。更正了這一點,並立即生效。
如果你是遊戲的解決方案作爲回顧一下你的自己的答案,我會刪除我的答案。 (請參閱http://meta.stackexchange.com/questions/90263/unanswered-question-answered-in-comments,瞭解爲什麼這會有所幫助。)謝謝! – DreadPirateShawn 2013-10-09 16:18:47
剛接受你的回答。 – Chandranshu 2013-10-21 02:32:55