Рубин на рельсах MongoDB - PullRequest
       10

Рубин на рельсах MongoDB

0 голосов
/ 06 марта 2019

сентос 7,
ruby установить через rvm,
Рубиновая версия - 2.3.1

My mongoid.yml config:

production:
  clients:
    default:
      database: manhattan_production
      hosts:
        - 127.0.0.1:27017

Мне нужно перенести проект с одного сервера на другой,
но с: rake db:migrate RAILS_ENV="production":

D, [2019-03-05T19:33:37.698159 #3953] DEBUG -- : MONGODB | EVENT: #<Mongo::Monitoring::Event::TopologyOpening topology=Unknown>
D, [2019-03-05T19:33:37.698204 #3953] DEBUG -- : MONGODB | Topology type 'unknown' initializing.
D, [2019-03-05T19:33:37.698260 #3953] DEBUG -- : MONGODB | EVENT: #<Mongo::Monitoring::Event::ServerOpening address=127.0.0.1:27017 topology=Unknown>
D, [2019-03-05T19:33:37.698277 #3953] DEBUG -- : MONGODB | Server 127.0.0.1:27017 initializing.
D, [2019-03-05T19:33:37.699501 #3953] DEBUG -- : MONGODB | EVENT: #<Mongo::Monitoring::Event::TopologyChanged prev=Unknown new=Single>
D, [2019-03-05T19:33:37.699526 #3953] DEBUG -- : MONGODB | Topology type 'unknown' changed to type 'single'.
D, [2019-03-05T19:33:37.699551 #3953] DEBUG -- : MONGODB | EVENT: #<Mongo::Monitoring::Event::ServerDescriptionChanged>
D, [2019-03-05T19:33:37.699578 #3953] DEBUG -- : MONGODB | Server description for 127.0.0.1:27017 changed from 'unknown' to 'standalone'.
D, [2019-03-05T19:33:37.699609 #3953] DEBUG -- : MONGODB | EVENT: #<Mongo::Monitoring::Event::TopologyChanged prev=Single new=Single>
D, [2019-03-05T19:33:37.699624 #3953] DEBUG -- : MONGODB | There was a change in the members of the 'single' topology.
D, [2019-03-05T19:33:37.706314 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.find | STARTED | {"find"=>"i18n", "filter"=>{}, "lsid"=>{"id"=><BSON::Binary:0x63649180 type=uuid data=0xd3a201bbaf904a3d...>}}
D, [2019-03-05T19:33:37.707804 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.find | SUCCEEDED | 0.001s
...
D, [2019-03-05T19:33:38.709157 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.find | STARTED | {"find"=>"i18n", "filter"=>{}, "lsid"=>{"id"=><BSON::Binary:0x108109000 type=uuid data=0x6740a218e79f4f65...>}}
D, [2019-03-05T19:33:38.710046 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.find | SUCCEEDED | 0.000s
rake aborted!
SystemStackError: stack level too deep
/usr/local/rvm/gems/ruby-2.3.1/gems/bson-4.3.0/lib/bson/document.rb:198:in `convert_key'
/usr/local/rvm/gems/ruby-2.3.1/gems/bson-4.3.0/lib/bson/document.rb:68:in `[]='
/usr/local/rvm/gems/ruby-2.3.1/gems/bson-4.3.0/lib/bson/document.rb:136:in `block in initialize'
/usr/local/rvm/gems/ruby-2.3.1/gems/bson-4.3.0/lib/bson/document.rb:136:in `each_pair'
/usr/local/rvm/gems/ruby-2.3.1/gems/bson-4.3.0/lib/bson/document.rb:136:in `initialize'
/usr/local/rvm/gems/ruby-2.3.1/gems/bson-4.3.0/lib/bson/hash.rb:65:in `new'
/usr/local/rvm/gems/ruby-2.3.1/gems/bson-4.3.0/lib/bson/hash.rb:65:in `to_bson_normalized_value'
...
/usr/local/rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:24:in `eval'
/usr/local/rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
D, [2019-03-05T19:33:38.710345 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.find | STARTED | {"find"=>"i18n", "filter"=>{}, "lsid"=>{"id"=><BSON::Binary:0x108214660 type=uuid data=0x7c33494fcaf54a26...>}}
D, [2019-03-05T19:33:38.711192 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.find | SUCCEEDED | 0.000s
D, [2019-03-05T19:33:38.734405 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.find | FAILED | stack level too deep | 0.000947437s
D, [2019-03-05T19:33:38.788564 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | admin.endSessions | STARTED | {"endSessions"=>[{"id"=><BSON::Binary:0x63649180 type=uuid data=0xd3a201bbaf904a3d...>}, {"id"=><BSON::Binary:0x54806320 type=uuid data=0x61657459f303432c...>}, {"id"=><BSON::Binary:0x54607780 type=uuid data=0x26abb6a265594b13...>}, {"id"=><BSON::Bina...
D, [2019-03-05T19:33:38.789893 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | admin.endSessions | SUCCEEDED | 0.003s
D, [2019-03-05T19:33:38.790498 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.killCursors | STARTED | {"killCursors"=>"i18n", "cursors"=>[25178977312]}
D, [2019-03-05T19:33:38.790756 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.killCursors | SUCCEEDED | 0.000s
D, [2019-03-05T19:33:38.791005 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.killCursors | STARTED | {"killCursors"=>"i18n", "cursors"=>[23080764937]}
D, [2019-03-05T19:33:38.791240 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.killCursors | SUCCEEDED | 0.000s
D, [2019-03-05T19:33:38.791465 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.killCursors | STARTED | {"killCursors"=>"i18n", "cursors"=>[21492846266]}
D, [2019-03-05T19:33:38.791660 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.killCursors | SUCCEEDED | 0.000s
D, [2019-03-05T19:33:38.791877 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.killCursors | STARTED | {"killCursors"=>"i18n", "cursors"=>[25399117075]}
D, [2019-03-05T19:33:38.792074 #3953] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.killCursors | SUCCEEDED | 0.000s

С кепкой производства развернуть

D, [2019-03-05T17:01:27.065078 #16589] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.find | SUCCEEDED | 0.001s
D, [2019-03-05T17:01:27.065535 #16589] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.find | STARTED | {"find"=>"i18n", "filter"=>{}, "lsid"=>{"id"=><BSON::Binary:0x80645840 type=uuid data=0x0eafb5672197499f...>}}
D, [2019-03-05T17:01:27.067106 #16589] DEBUG -- : MONGODB | 127.0.0.1:27017 | manhattan_production.find | SUCCEEDED | 0.001s
 DEBUG [423fa122]       rake aborted!
 DEBUG [423fa122]       SystemStackError: stack level too deep
 DEBUG [423fa122]       /usr/local/rvm/gems/ruby-2.3.1/gems/bson-4.3.0/lib/bson/document.rb:198:in `convert_key'
/usr/local/rvm/gems/ruby-2.3.1/gems/bson-4.3.0/lib/bson/document.rb:68:in `[]='
/usr/local/rvm/gems/ruby-2.3.1/gems/bson-4.3.0/lib/bson/document.rb:136:in `block in initialize'
...

Моя связка

bundle install
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

Что я забыл или неправильно сделал какую-либо помощь?

...