所以我需要添加另一列并生成一个迁移文件(rails生成迁移add_email email:string),当尝试做rails db:migrate时出现此错误。我认为我没有做任何事情,我的意思是我一周前进行了第一次迁移,所以是的,我不知道发生了什么。有没有发生过这件事?哦,我无法回滚/重置相同的错误。 谢谢!
rails aborted!
NoMethodError: undefined method `application' for Rails:Module
C:/Users/Stratos_desktop/Desktop/Antalakse_to/myapp/Rakefile:4:in `<top (required)>'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/rake_module.rb:29:in `load'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/rake_module.rb:29:in `load_rakefile'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:703:in `raw_load_rakefile'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:104:in `block in load_rakefile'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:103:in `load_rakefile'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/rake/rake_command.rb:22:in `block in perform'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/rake/rake_command.rb:20:in `perform'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/command.rb:48:in `invoke'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/railties-6.0.3.2/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'