You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to run ferry in development I end up with an ActiveRecord::NoDatabaseError (see stack trace below). I solved the issue in a fork and will create a pull request for it. It seems like the problem occurs because ferry tries to use the system user name to access the postgreSQL server.
$ ferry --to_csv development items
operating with postgresql
/home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:898:in `rescue in connect': FATAL: role "roland" does not exist (ActiveRecord::NoDatabaseError)
from /home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `connect'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:568:in `initialize'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:435:in `new_connection'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:445:in `checkout_new_connection'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `acquire_connection'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:351:in `block in checkout'
from /home/roland/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:350:in `checkout'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
from /home/roland/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:541:in `retrieve_connection'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/connection_handling.rb:87:in `connection'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/ferry-1.0.1/lib/ferry/exporter.rb:11:in `to_csv'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/ferry-1.0.1/bin/ferry:12:in `block (2 levels) in <top (required)>'
from /home/roland/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/optparse.rb:1359:in `call'
from /home/roland/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/optparse.rb:1359:in `block in parse_in_order'
from /home/roland/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/optparse.rb:1346:in `catch'
from /home/roland/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/optparse.rb:1346:in `parse_in_order'
from /home/roland/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/optparse.rb:1340:in `order!'
from /home/roland/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/optparse.rb:1432:in `permute!'
from /home/roland/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/optparse.rb:1454:in `parse!'
from /home/roland/.rvm/gems/ruby-2.1.2/gems/ferry-1.0.1/bin/ferry:50:in `<top (required)>'
from /home/roland/.rvm/gems/ruby-2.1.2/bin/ferry:23:in `load'
from /home/roland/.rvm/gems/ruby-2.1.2/bin/ferry:23:in `<main>'
from /home/roland/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
from /home/roland/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
It seems I just had to change ownership of some tables for most of the tests to pass locally.
But I'm still seeing one failure ...
Failures:
1) utility functions #db_connect #postgresql fails if system user name is not role in PostgreSQL
Failure/Error: expect{ActiveRecord::Base.connection.adapter_name}.to raise_error
expected Exception but nothing was raised
# ./tests/utilities_tests.rb:20:in `block (3 levels) in <top (required)>'
When I try to run ferry in development I end up with an ActiveRecord::NoDatabaseError (see stack trace below). I solved the issue in a fork and will create a pull request for it. It seems like the problem occurs because ferry tries to use the system user name to access the postgreSQL server.
Rspec also fails with:
The text was updated successfully, but these errors were encountered: