Rails应用 - 脚手架错误 [英] Rails Apps - scaffold error
问题描述
我在我的命令行执行脚手架命令时,有一个Rails应用程序的问题。我使用了轨生成脚手架用户名:字符串电子邮件:字符串
命令,我们的老师今天给我们。他的工作,但我得到以下几点。
有更多的线路,但我希望你的想法。如果我需要后剩下的,我会的。除此之外,如果有,有这个问题的答案另一个问题,请点我在那个方向。谢谢你在前进。
尝试建立数据库首先运行此命令
耙分贝:滴分贝:创建DB:迁移
或
耙分贝:重设
I'm having a rails app problem when executing the scaffold command in my command line. I used the rails generate scaffold User name:string email:string
command that our teacher showed us today. His worked, but mine gets the following.
c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/dynamic_matchers.rb:55:in `method_missing': undefined method `migration_error=' for ActiveRecord::Base:Class (NoMethodError)
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/railtie.rb:66:in `block (3 levels) in <class:Railtie>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/railtie.rb:65:in `each'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/railtie.rb:65:in `block (2 levels) in <class:Railtie>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
There are more lines, but I would hope that you get the idea. If I need to post the rest, I will. Beyond that, if there is another question that has the answer to this, please point me in that direction. Thank you in advance.
Try set up your database first by running this command
rake db:drop db:create db:migrate
or
rake db:reset
这篇关于Rails应用 - 脚手架错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!