Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

NoMethod Error #99

Open
akinokaze opened this issue Jun 25, 2015 · 4 comments
Open

NoMethod Error #99

akinokaze opened this issue Jun 25, 2015 · 4 comments

Comments

@akinokaze
Copy link

Getting a NoMethod error on initial run. Any ideas?

mosql -c /etc/mosql/collections.yml --mongo mongodb://ip/test --sql postgres://host/test

/usr/local/lib/ruby/gems/2.0.0/gems/mosql-0.4.3/lib/mosql/schema.rb:83:in 'block (2 levels) in create_schema': undefined method '[]' for nil:NilClass (NoMethodError) from /usr/local/lib/ruby/gems/2.0.0/gems/mosql-0.4.3/lib/mosql/schema.rb:80:in 'each' from /usr/local/lib/ruby/gems/2.0.0/gems/mosql-0.4.3/lib/mosql/schema.rb:80:in 'block in create_schema' from /usr/local/lib/ruby/gems/2.0.0/gems/mosql-0.4.3/lib/mosql/schema.rb:79:in 'each' from /usr/local/lib/ruby/gems/2.0.0/gems/mosql-0.4.3/lib/mosql/schema.rb:79:in 'create_schema' from /usr/local/lib/ruby/gems/2.0.0/gems/mosql-0.4.3/lib/mosql/streamer.rb:90:in 'initial_import' from /usr/local/lib/ruby/gems/2.0.0/gems/mosql-0.4.3/lib/mosql/streamer.rb:28:in 'import' from /usr/local/lib/ruby/gems/2.0.0/gems/mosql-0.4.3/lib/mosql/cli.rb:167:in 'run' from /usr/local/lib/ruby/gems/2.0.0/gems/mosql-0.4.3/lib/mosql/cli.rb:16:in 'run' from /usr/local/lib/ruby/gems/2.0.0/gems/mosql-0.4.3/bin/mosql:5:in '<top (required)>' from /usr/local/bin/mosql:23:in 'load' from /usr/local/bin/mosql:23:in '<main>'

@mayatskiy
Copy link

+1

@tbatchelli
Copy link

I had this issue and it was caused by missing meta-table, e.g.:

staging-bookings:
  bookings:
    :meta:
      :table: bookings
    :columns:
      ...

the documentation is not clear in that this is needed, or there is a bug somewhere, but adding this metadata made it all work.

@joanrodriguez
Copy link

This did the trick for me, documentation unclear indeed

@GMolini
Copy link

GMolini commented Nov 14, 2016

That did the trick for me too. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants