2
我遇到了一個非常奇怪的情況。我有這種情況,有時會通過。有時它不會。實際上,每一步都是綠色的,但是在這一步之後,它會產生這個垃圾堆棧跟蹤,它不會告訴我任何有關我的應用程序的信息。Postgres或database_cleaner?
我在這裏沒有做任何複雜的事情,只是簡單地試着用TinyMCE創建一個該死的評論。我還有其他20種情景,其中一些情景要複雜得多。
這可能有助於說明我的環境中的所有,雖然它是從堆棧跟蹤很明顯:
的Rails 3.1,紅寶石1.9.2,一切最新的「穩定」版本。 Postgres 9.0.4。
有人能比我聰明解釋爲什麼我會遇到這個問題嗎?
Feature: Payment object comments
In order to explain a action I performed on a payment object
As a user
I want to make a comment
@wip @javascript
Scenario: Creating a comment # features/payment_objects/comments.feature:8
[paperclip] Saving attachments.
[paperclip] Saving attachments.
[paperclip] Saving attachments.
Given I am in a company # features/step_definitions/application_steps.rb:1
And I have created 1 cash requisitions # features/step_definitions/payment_steps.rb:5
When I am on the requisitions page # features/step_definitions/web_steps.rb:44
And I click on the 1st requisition # features/step_definitions/payment_steps.rb:39
When I open the Comments tab # features/step_definitions/payment_steps.rb:101
http://127.0.0.1:51796/assets/tinymce/plugins/spellchecker/editor_plugin.js?3.4.5:1 Error: Sprockets::EncodingError: /Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/tinymce-rails-3.4.5/assets/precompiled/tinymce/plugins/spellchecker/editor_plugin.js has a invalid UTF-8 byte sequence
When I fill in "comment_content" with "Testing123" # features/step_definitions/web_steps.rb:64
And I click on "Comment" # features/step_definitions/web_steps.rb:52
Then there should be a comment saying "Testing123" # features/step_definitions/payment_steps.rb:106
http://127.0.0.1:51796/assets/tinymce/plugins/spellchecker/editor_plugin.js?3.4.5:1 Error: Sprockets::EncodingError: /Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/tinymce-rails-3.4.5/assets/precompiled/tinymce/plugins/spellchecker/editor_plugin.js has a invalid UTF-8 byte sequence
NoMethodError: undefined method `nfields' for nil:NilClass: SELECT tablename
FROM pg_tables
WHERE schemaname = ANY (current_schemas(false))
(ActiveRecord::StatementInvalid)
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/whiny_nil.rb:48:in `method_missing'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:490:in `result_as_array'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:533:in `block in query'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract_adapter.rb:244:in `block in log'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract_adapter.rb:239:in `log'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:532:in `query'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:666:in `tables'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:455:in `disable_referential_integrity'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/active_record/truncation.rb:113:in `each_table'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/active_record/truncation.rb:106:in `clean'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/base.rb:77:in `clean'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/configuration.rb:56:in `block in clean'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/configuration.rb:56:in `each'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/database_cleaner-0.6.7/lib/database_cleaner/configuration.rb:56:in `clean'
/Users/pma/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-rails-1.0.2/lib/cucumber/rails/hooks/database_cleaner.rb:9:in `After'