gpt4 book ai didi

ruby-on-rails - 无法在我的本地主机上运行 stripe-ruby-mock

转载 作者:数据小太阳 更新时间:2023-10-29 09:03:44 27 4
gpt4 key购买 nike

我正在尝试编写一些集成测试以在我的应用程序中分条付款。我找到了一些不错的教程:

http://www.jeffthomas.xyz/integration-tests-with-stripe/

我所做的一切都与本教程中的一样,但是当我运行我的规范时,他们给了我以下错误:

Daemon has started successfully
Killing server at ./stripe-mock-server.pid
Stopped PID: 5650 at ./stripe-mock-server.pid
Coverage report generated for RSpec to /home/mateusz/projekty/bp-web/coverage. 351 / 437 LOC (80.32%) covered.
/home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in `async_exec': PG::ConnectionBad: PQconsumeInput() server closed the connection unexpectedly (ActiveRecord::StatementInvalid)
This probably means the server terminated abnormally
before or while processing the request.
: SELECT COUNT(*)
FROM pg_class c
LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind IN ('r','v','m') -- (r)elation/table, (v)iew, (m)aterialized view
AND c.relname = 'schema_migrations'
AND n.nspname = ANY (current_schemas(false))
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in `block in exec_no_cache'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_adapter.rb:466:in `block in log'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_adapter.rb:460:in `log'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in `exec_no_cache'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:584:in `execute_and_clear'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec_query'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql/schema_statements.rb:105:in `table_exists?'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/migration.rb:843:in `get_all_versions'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/migration.rb:855:in `needs_migration?'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/migration.rb:397:in `load_schema_if_pending!'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/migration.rb:412:in `block in maintain_test_schema!'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/migration.rb:640:in `suppress_messages'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/migration.rb:417:in `method_missing'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.0/lib/active_record/migration.rb:412:in `maintain_test_schema!'
from /home/mateusz/projekty/bp-web/spec/rails_helper.rb:11:in `<top (required)>'
from /home/mateusz/projekty/bp-web/spec/features/billing_details_update_spec.rb:1:in `require'
from /home/mateusz/projekty/bp-web/spec/features/billing_details_update_spec.rb:1:in `<top (required)>'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1226:in `load'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1226:in `block in load_spec_files'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224:in `each'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224:in `load_spec_files'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:97:in `setup'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:85:in `run'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:70:in `run'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:38:in `invoke'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/gems/rspec-core-3.2.0/exe/rspec:4:in `<top (required)>'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/bin/rspec:23:in `load'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/bin/rspec:23:in `<main>'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/bin/ruby_executable_hooks:15:in `eval'
from /home/mateusz/.rvm/gems/ruby-2.2.0-preview1/bin/ruby_executable_hooks:15:in `<main>'

有什么想法吗?

最佳答案

我解决了这个问题但是忘了在这里写答案:

https://github.com/rebelidealist/stripe-ruby-mock/issues/202#issuecomment-81462909

关于ruby-on-rails - 无法在我的本地主机上运行 stripe-ruby-mock,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29071196/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com