#50 ✓resolved
renchap

rake migrate:powerdns with postgres

Reported by renchap | January 10th, 2009 @ 09:57 PM

Hi,

I want to try PowerDNS on Rails to add an UI to my existing Power DNS installation, which use postgres as backend.

It seems the migrate:powerdns task only works with MySQL, i think it should also work for postgres and sqlite.

I will try to make it work with Postgres, but i am not sure i understand well this task (especially the establish_connection method).

When i run it :

$ RAILS_ENV=production rake migrate:powerdns (in /home/powerdnsonrails/powerdns-on-rails)

WARNING: This will import all the domains and records from a PowerDNS database into the PowerDNS on Rails database. Existing records will be overwritten in the process without warning. Are you sure you want to continue? [y/N] y

PowerDNS database adapter (mysql only at the moment) [mysql]: postgresql PowerDNS database host [localhost]: localhost PowerDNS database port [3306]: 5432 PowerDNS database name []: pdns PowerDNS database username []: renchap PowerDNS database password []: password PowerDNS database encoding [UTF-8]:

A complete log file containing verbose data will be available at the path below after the migration /home/powerdnsonrails/powerdns-on-rails/log/powerdns-import-20090110202547.log

rake aborted! can't convert String into Integer

Comments and changes to this ticket

  • Kenneth Kalmer

    Kenneth Kalmer January 11th, 2009 @ 09:43 PM

    Would appreciate it very much if you could get it to work with postgres. That script needs a lot of work in any case...

    Try running it like this and gimme the output so I can help you pinpoint the issue.

    $ RAILS_ENV=production rake migrate:powerdns -- trace

    Thanks

  • renchap

    renchap January 11th, 2009 @ 10:11 PM

    Here is the output :

    
    $ RAILS_ENV=production rake migrate:powerdns --trace
    (in /home/powerdnsonrails/powerdns-on-rails)
    You don't have the cucumber gem installed.
    Unless you're developing patches for powerdns-on-rails, you can ignore this message.
    To learn more about cucumber, please visit the URL below
    http://github.com/aslakhellesoy/cucumber/wikis
    
    ** Invoke migrate:powerdns (first_time)
    ** Invoke environment (first_time)
    ** Execute environment
    ** Execute migrate:powerdns
    WARNING: This will import all the domains and records from a PowerDNS
    database into the PowerDNS on Rails database. Existing records will be
    overwritten in the process without warning.
    Are you sure you want to continue? [y/N] y
    
    PowerDNS database adapter (mysql only at the moment) [mysql]: postgresql
    PowerDNS database host [localhost]: localhost
    PowerDNS database port [3306]: 5432
    PowerDNS database name []: pdns
    PowerDNS database username []: renchap
    PowerDNS database password []: password
    PowerDNS database encoding [UTF-8]:
    
    A complete log file containing verbose data will be available at the path below after the migration
    /home/powerdnsonrails/powerdns-on-rails/log/powerdns-import-20090111210855.log
    
    rake aborted!
    can't convert String into Integer
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:931:in `initialize'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:931:in `connect'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:931:in `connect'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:210:in `initialize'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `new'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout'
    /usr/lib64/ruby/1.8/monitor.rb:242:in `synchronize'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:121:in `retrieve_connection'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:113:in `connection'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/base.rb:1220:in `columns'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/calculations.rb:281:in `column_for'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/calculations.rb:121:in `calculate'
    /home/powerdnsonrails/powerdns-on-rails/vendor/rails/activerecord/lib/active_record/calculations.rb:48:in `count'
    /home/powerdnsonrails/powerdns-on-rails/lib/tasks/migrate_from_powerdns.rake:81:in `migrate!'
    /home/powerdnsonrails/powerdns-on-rails/lib/tasks/migrate_from_powerdns.rake:261
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'
    /usr/lib64/ruby/1.8/monitor.rb:242:in `synchronize'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
    /usr/lib64/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
    /usr/bin/rake:19:in `load'
    /usr/bin/rake:19
    
  • renchap

    renchap January 26th, 2009 @ 12:51 AM

    When you enter a port for postgresql in this task (PowerDNS database port [3306]: 5432), the port should be converted to an integer.

    It seems that MySQL adapter accepts the port as a string, but postgresql adapter errors if it is not an integer.

  • Kenneth Kalmer

    Kenneth Kalmer February 4th, 2009 @ 08:48 AM

    (from [c32c13002957a07eba14e868573812e967bdb9b3]) Integer port number for postgres import [[#50] state:resolved] http://github.com/kennethkalmer/...

  • Kenneth Kalmer

    Kenneth Kalmer July 9th, 2011 @ 01:23 PM

    • State changed from “new” to “resolved”
    • Milestone order changed from “0” to “0”

    Doing some housekeeping. Please use the Github issue tracker at https://github.com/kennethkalmer/powerdns-on-rails/issues in the future. Thank you !

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

This issue tracker has been deprecated. Please use the Github issue tracker at https://github.com/kennethkalmer/powerdns-on-rails/issues

Thank you

People watching this ticket

Referenced by

Pages