从c9.io迁移到AWS Cloud9后如何解决rake db:migrate错误?

时间:2019-04-04 12:50:44

标签: ruby-on-rails rake cloud9 aws-cloud9

我刚刚将旧的Rails项目从c9.io迁移到了AWS Cloud9,迁移后,我运行了

bundle install

它工作正常,但是随后当我尝试运行时:

rake db:migrate

发生此错误:

  

/home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   在“ block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in   block (2 levels) in <class:Numeric>' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/cache/strategy/local_cache.rb:138:in local_cache_key'   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/cache/strategy/local_cache.rb:74:in   middleware' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-4.2.5/lib/rails/application/bootstrap.rb:79:in 屏蔽“   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in   instance_exec' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in 运行'   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in   block in run_initializers' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in run_initializers'   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-4.2.5/lib/rails/application.rb:352:in   initialize!' /home/ec2-user/environment/config/environment.rb:5:in '   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in require' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in中的require块   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in load_dependency' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in require'   /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-4.2.5/lib/rails/application.rb:328:in   require_environment!' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-4.2.5/lib/rails/application.rb:457:in 在run_tasks_blocks的任务中进行阻止:TOP => db:migrate =>环境   (通过使用--trace运行任务来查看完整跟踪)

有人知道如何解决吗?

0 个答案:

没有答案