I answered your question on SO : http://stackoverflow.com/questions/6721491/pgerror-no-connection-to-the-server-on-running-specs-with-spork
On 20 juin, 17:38, Wael Nasreddine <[email protected]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Yeah, everything is set.. Like I said, the tests passes the first time, but > on the second run (invoked by guard), they don't.. > > On Jun 20, 2011, at 5:34 PM, ee_smajors wrote: > > > > > > > > > Is your PG service running? Does you app have authorized access to the > > DB? Is app pointed at right port? (new myself .. sorry if pointing > > you in obviously wrong simpleton solutions) :) > > > ee > > > On Jun 19, 11:34 am, Wael Nasreddine <[email protected]> > > wrote: > >> Hey Guys, > > >> This is probably not specific to Rails, but I'm kinda hoping someone > >> already faced this error, it's been hours trying to debug the issue, but I > >> just can't figure out why it's happening > > >> So the application I'm developing is on Rails 3.1 using the 3-1-stable > >> branch, up-to-date, and I'm using latest version of all the Gems listed in > >> the Gemfile below.. > > >> When I run guard with the guard-spork portion commented, everything works > >> just fine, however, if I enable spork, I get the following error on the > >> second time the tests run, that's right, the first time the tests run like > >> usual but If I save/touch any of the test file, rspec gets invoked and the > >> following error is shown (all the tests fail of course). > > >> Any hints? > > >> Regards, > >> Wael > > >> Failure/Error: Unable to find matching line from backtrace > >> PGError: > >> noconnectionto theserver > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> ecord/lib/active_record/connection_adapters/postgresql_adapter.rb:272:in > >> `exec' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> ecord/lib/active_record/connection_adapters/postgresql_adapter.rb:272:in > >> `block in clear_cache!' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> ecord/lib/active_record/connection_adapters/postgresql_adapter.rb:271:in > >> `each_value' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> ecord/lib/active_record/connection_adapters/postgresql_adapter.rb:271:in > >> `clear_cache!' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> ecord/lib/active_record/connection_adapters/postgresql_adapter.rb:286:in > >> `reconnect!' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> ecord/lib/active_record/connection_adapters/abstract_adapter.rb:167:in > >> `verify!' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> > >> ecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:315 > >> :in `block in checkout_and_verify' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/actives > >> upport/lib/active_support/callbacks.rb:390:in `_run_checkout_callbacks' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/actives > >> upport/lib/active_support/callbacks.rb:81:in `run_callbacks' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> > >> ecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:314 > >> :in `checkout_and_verify' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> > >> ecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:310 > >> :in `checkout_existing_connection' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> > >> ecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:253 > >> :in `block (2 levels) in checkout' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> > >> ecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:251 > >> :in `loop' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> > >> ecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:251 > >> :in `block in checkout' > >> # > >> /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:in > >> `mon_synchronize' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> > >> ecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:250 > >> :in `checkout' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> > >> ecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:152 > >> :in `connection' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> > >> ecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:389 > >> :in `retrieve_connection' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> > >> ecord/lib/active_record/connection_adapters/abstract/connection_specificati > >> on.rb:107:in `retrieve_connection' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> > >> ecord/lib/active_record/connection_adapters/abstract/connection_specificati > >> on.rb:89:in `connection' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> ecord/lib/active_record/fixtures.rb:463:in `create_fixtures' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> ecord/lib/active_record/fixtures.rb:928:in `load_fixtures' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/rails-e402b688cc2e/activer > >> ecord/lib/active_record/fixtures.rb:894:in `setup_fixtures' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rspec-rails-2.6.1/lib/rspec/rails/ > >> adapters.rb:11:in `block (2 levels) in setup' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/hooks.rb:35:in `instance_eval' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/hooks.rb:35:in `run_in' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/hooks.rb:70:in `block in run_all' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/hooks.rb:70:in `each' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/hooks.rb:70:in `run_all' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/hooks.rb:116:in `run_hook' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example_group.rb:221:in `block in eval_before_eachs' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example_group.rb:221:in `each' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example_group.rb:221:in `eval_before_eachs' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example.rb:145:in `run_before_each' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example.rb:47:in `block in run' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example.rb:107:in `with_around_hooks' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example.rb:45:in `run' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example_group.rb:294:in `block in run_examples' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example_group.rb:290:in `map' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example_group.rb:290:in `run_examples' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example_group.rb:262:in `run' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example_group.rb:263:in `block in run' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example_group.rb:263:in `map' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example_group.rb:263:in `run' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example_group.rb:263:in `block in run' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example_group.rb:263:in `map' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/example_group.rb:263:in `run' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/command_line.rb:24:in `block (2 levels) in run' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/command_line.rb:24:in `map' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/command_line.rb:24:in `block in run' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/reporter.rb:12:in `report' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> core/command_line.rb:21:in `run' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rspec-core-2.6.4/lib/rspec/ > >> monkey/spork/test_framework/rspec.rb:5:in `run_tests' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/spork-b15cfd209b5b/lib/spo > >> rk/run_strategy/forking.rb:13:in `block in run' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/spork-b15cfd209b5b/lib/spo > >> rk/forker.rb:21:in `block in initialize' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/spork-b15cfd209b5b/lib/spo > >> rk/forker.rb:18:in `fork' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/spork-b15cfd209b5b/lib/spo > >> rk/forker.rb:18:in `initialize' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/spork-b15cfd209b5b/lib/spo > >> rk/run_strategy/forking.rb:9:in `new' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/spork-b15cfd209b5b/lib/spo > >> rk/run_strategy/forking.rb:9:in `run' > >> # > >> /usr/local/rvm/gems/ruby-1.9.2-p180/bundler/gems/spork-b15cfd209b5b/lib/spo > >> rk/server.rb:48:in `run' > >> # > > ... > > plus de détails » -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

