algobasket / PeatioCryptoExchange

An open-source Crypto-Currency exchange. Peatio v3.0 Coming Soon !
https://www.peatio.info
186 stars 202 forks source link

rake db:setup error #40

Closed cipherzzz closed 5 years ago

cipherzzz commented 5 years ago

Hello, @algobasket! Thanks for the great docs - I am looking forward to getting my V1 up and running. I am having an issue running the simple rake setup command. I am not sure what is going on from the trace - any ideas? I followed your video and the production deploy steps on a vagrant box, but I'm kindof stuck here...

deploy@ubuntu-xenial:~/peatio/current$ bundle exec rake db:setup --trace
/home/deploy/.rvm/gems/ruby-2.2.2/gems/figaro-1.1.1/lib/figaro/application.rb:84:in `non_string_configuration!' : WARNING: Use strings for Figaro configuration. 60 was converted to "60". (StructuredWarnings::StandardWarning)
/home/deploy/.rvm/gems/ruby-2.2.2/gems/figaro-1.1.1/lib/figaro/application.rb:84:in `non_string_configuration!' : WARNING: Use strings for Figaro configuration. 8080 was converted to "8080". (StructuredWarnings::StandardWarning)
/home/deploy/.rvm/gems/ruby-2.2.2/gems/figaro-1.1.1/lib/figaro/application.rb:84:in `non_string_configuration!' : WARNING: Use strings for Figaro configuration. 65910 was converted to "65910". (StructuredWarnings::StandardWarning)
/home/deploy/.rvm/gems/ruby-2.2.2/gems/figaro-1.1.1/lib/figaro/application.rb:84:in `non_string_configuration!' : WARNING: Use strings for Figaro configuration. 80 was converted to "80". (StructuredWarnings::StandardWarning)
/home/deploy/.rvm/gems/ruby-2.2.2/gems/figaro-1.1.1/lib/figaro/application.rb:84:in `non_string_configuration!' : WARNING: Use strings for Figaro configuration. 80 was converted to "80". (StructuredWarnings::StandardWarning)
/home/deploy/.rvm/gems/ruby-2.2.2/gems/figaro-1.1.1/lib/figaro/application.rb:84:in `non_string_configuration!' : WARNING: Use strings for Figaro configuration. 443 was converted to "443". (StructuredWarnings::StandardWarning)
/home/deploy/.rvm/gems/ruby-2.2.2/gems/figaro-1.1.1/lib/figaro/application.rb:84:in `non_string_configuration!' : WARNING: Use strings for Figaro configuration. true was converted to "true". (StructuredWarnings::StandardWarning)
/home/deploy/.rvm/gems/ruby-2.2.2/gems/figaro-1.1.1/lib/figaro/application.rb:84:in `non_string_configuration!' : WARNING: Use strings for Figaro configuration. false was converted to "false". (StructuredWarnings::StandardWarning)
/home/deploy/.rvm/gems/ruby-2.2.2/gems/figaro-1.1.1/lib/figaro/application.rb:84:in `non_string_configuration!' : WARNING: Use strings for Figaro configuration. 3820920586 was converted to "3820920586". (StructuredWarnings::StandardWarning)
** Invoke db:setup (first_time)
** Invoke db:schema:load_if_ruby (first_time)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:create
peatio_production already exists
** Invoke environment (first_time)
** Execute environment
rake aborted!
NameError: uninitialized constant ActiveRecord::Type
/home/deploy/.rvm/gems/ruby-2.2.2/gems/enumerize-2.2.2/lib/enumerize/activerecord.rb:69:in `<module:ActiveRecordSupport>'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/enumerize-2.2.2/lib/enumerize/activerecord.rb:2:in `<module:Enumerize>'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/enumerize-2.2.2/lib/enumerize/activerecord.rb:1:in `<top (required)>'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/enumerize-2.2.2/lib/enumerize.rb:40:in `extended'
/home/deploy/peatio/current/app/models/deposit.rb:4:in `extend'
/home/deploy/peatio/current/app/models/deposit.rb:4:in `<class:Deposit>'
/home/deploy/peatio/current/app/models/deposit.rb:1:in `<top (required)>'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/inflector/methods.rb:226:in `const_get'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/inflector/methods.rb:226:in `block in constantize'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/inflector/methods.rb:224:in `each'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/inflector/methods.rb:224:in `inject'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/inflector/methods.rb:224:in `constantize'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/core_ext/string/inflections.rb:66:in `constantize'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:309:in `block in observe'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:309:in `collect!'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:309:in `observe'
/home/deploy/peatio/current/app/observers/transfer_observer.rb:2:in `<class:TransferObserver>'
/home/deploy/peatio/current/app/observers/transfer_observer.rb:1:in `<top (required)>'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/inflector/methods.rb:226:in `const_get'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/inflector/methods.rb:226:in `block in constantize'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/inflector/methods.rb:224:in `each'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/inflector/methods.rb:224:in `inject'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/inflector/methods.rb:224:in `constantize'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/core_ext/string/inflections.rb:66:in `constantize'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:183:in `instantiate_observer'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:108:in `block in instantiate_observers'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:108:in `each'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:108:in `instantiate_observers'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rails-observers-0.1.5/lib/rails/observers/railtie.rb:42:in `block (2 levels) in <class:Railtie>'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:27:in `each'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rails-observers-0.1.5/lib/rails/observers/railtie.rb:41:in `block in <class:Railtie>'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:36:in `call'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:44:in `each'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/railties-4.0.13/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/railties-4.0.13/lib/rails/initializable.rb:30:in `instance_exec'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/railties-4.0.13/lib/rails/initializable.rb:30:in `run'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/railties-4.0.13/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `call'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/railties-4.0.13/lib/rails/initializable.rb:54:in `run_initializers'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/railties-4.0.13/lib/rails/application.rb:215:in `initialize!'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/railties-4.0.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/deploy/peatio/current/config/environment.rb:5:in `<top (required)>'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/railties-4.0.13/lib/rails/application.rb:189:in `require_environment!'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/railties-4.0.13/lib/rails/application.rb:260:in `block in run_tasks_blocks'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:273:in `call'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:273:in `block in execute'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:273:in `each'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:273:in `execute'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:214:in `block in invoke_with_call_chain'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:194:in `invoke_with_call_chain'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:238:in `block in invoke_prerequisites'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:236:in `each'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:236:in `invoke_prerequisites'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:213:in `block in invoke_with_call_chain'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:194:in `invoke_with_call_chain'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:238:in `block in invoke_prerequisites'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:236:in `each'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:236:in `invoke_prerequisites'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:213:in `block in invoke_with_call_chain'
/home/deploy/.rbenv/versions/2.2.2/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:194:in `invoke_with_call_chain'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/task.rb:183:in `invoke'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/application.rb:160:in `invoke_task'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/application.rb:116:in `each'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/application.rb:116:in `block in top_level'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/application.rb:125:in `run_with_threads'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/application.rb:110:in `top_level'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/application.rb:83:in `block in run'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
/home/deploy/.rvm/gems/ruby-2.2.2/gems/rake-12.3.2/lib/rake/application.rb:80:in `run'
/home/deploy/.rbenv/versions/2.2.2/bin/rake:33:in `<main>'
Tasks: TOP => db:setup => db:schema:load_if_ruby => environment
deploy@ubuntu-xenial:~/peatio/current$ 
algobasket commented 5 years ago

peatio_production already exists Your database already exist

cipherzzz commented 5 years ago

Thanks @algobasket - You were right. rake db:drop and another rake db:setup worked. Thanks!