anlek/mongify

no implicit conversion of Time into String (TypeError)

Closed this issue · 4 comments

Mongify works in process mode (although seems to timeout somewhere for me on updating)
When i try with sync I get this error. The translation remains the same. Any ideas?

/home/cabox/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/time.rb:325:in _parse': no implicit conversion of Time into String (TypeError) | ETA: --:--:-- from /home/cabox/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/time.rb:325:inparse'
from /home/cabox/.rvm/gems/ruby-2.1.2/gems/mongify-1.2.4/lib/mongify/translation/sync.rb:66:in block (2 levels) in sync_data' from /home/cabox/.rvm/gems/ruby-2.1.2/gems/mongify-1.2.4/lib/mongify/translation/sync.rb:64:ineach'
from /home/cabox/.rvm/gems/ruby-2.1.2/gems/mongify-1.2.4/lib/mongify/translation/sync.rb:64:in block in sync_data' from /home/cabox/.rvm/gems/ruby-2.1.2/gems/mongify-1.2.4/lib/mongify/translation/sync.rb:58:ineach'
from /home/cabox/.rvm/gems/ruby-2.1.2/gems/mongify-1.2.4/lib/mongify/translation/sync.rb:58:in sync_data' from /home/cabox/.rvm/gems/ruby-2.1.2/gems/mongify-1.2.4/lib/mongify/translation/sync.rb:29:insync'
from /home/cabox/.rvm/gems/ruby-2.1.2/gems/mongify-1.2.4/lib/mongify/cli/command/worker.rb:71:in execute' from /home/cabox/.rvm/gems/ruby-2.1.2/gems/mongify-1.2.4/lib/mongify/cli/application.rb:28:inexecute!'
from /home/cabox/.rvm/gems/ruby-2.1.2/gems/mongify-1.2.4/bin/mongify:15:in <top (required)>' from /home/cabox/.rvm/gems/ruby-2.1.2/bin/mongify:23:inload'
from /home/cabox/.rvm/gems/ruby-2.1.2/bin/mongify:23:in <main>' from /home/cabox/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:ineval'
from /home/cabox/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `

'

Unfortunately I wasn't the one who added the sync feature, maybe @hammady might be able to help.

@latitudehopper please run the tests and see if they all succeed. Otherwise, please create a failing test case so that I fix it.

Hi @hammady
i am getting this error

mongify sy database.config translation_file.rb
Syncing <table_name>: (2/2) 100% |ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:00
/usr/local/share/gems/gems/mongify-1.2.4/lib/mongify/translation/sync.rb:74:in block in sync_data': undefined methodname' for nil:NilClass (NoMethodError) 00:00:00
from /usr/local/share/gems/gems/mongify-1.2.4/lib/mongify/translation/sync.rb:58:in each' from /usr/local/share/gems/gems/mongify-1.2.4/lib/mongify/translation/sync.rb:58:insync_data'
from /usr/local/share/gems/gems/mongify-1.2.4/lib/mongify/translation/sync.rb:29:in sync' from /usr/local/share/gems/gems/mongify-1.2.4/lib/mongify/cli/command/worker.rb:71:inexecute'
from /usr/local/share/gems/gems/mongify-1.2.4/lib/mongify/cli/application.rb:28:in execute!' from /usr/local/share/gems/gems/mongify-1.2.4/bin/mongify:15:in<top (required)>'
from /usr/local/bin/mongify:23:in load' from /usr/local/bin/mongify:23:in

'

please help me to fix this, i am new to ruby.

@mvc089 seems duplicate of #79, you need to have a primary key and denote it as :key in your translation file.