Rails引擎生成迁移不会创建迁移文件

时间:2014-08-12 11:09:40

标签: ruby-on-rails ruby ruby-on-rails-3 rails-engines

我刚刚开始使用Rails Engine。 我想创建迁移文件,但它不会在db / migrate文件夹中创建任何迁移文件。

当我点击命令时,

rails g scaffold test name:string

它会生成除迁移之外的所有内容

ascratech @ ascratech-desktop:〜/ Rohinee / demo_projects / blog $ rails g scaffold测试名称:string

  invoke  resource_route
   route    resources :tests
  invoke  scaffold_controller
  create    app/controllers/blog/tests_controller.rb
  invoke    erb
  create      app/views/blog/tests
  create      app/views/blog/tests/index.html.erb
  create      app/views/blog/tests/edit.html.erb
  create      app/views/blog/tests/show.html.erb
  create      app/views/blog/tests/new.html.erb
  create      app/views/blog/tests/_form.html.erb
  invoke    rspec
  create      spec/controllers/blog/tests_controller_spec.rb
  create      spec/routing/blog/tests_routing_spec.rb
  invoke      test_unit
  create        test/integration/blog/test_test.rb
  invoke    helper
  create      app/helpers/blog/tests_helper.rb
  invoke      rspec
  create        spec/helpers/blog/tests_helper_spec.rb
  invoke  assets
  invoke    js
  create      app/assets/javascripts/blog/tests.js
  invoke    css
  create      app/assets/stylesheets/blog/tests.css
  invoke  css
  create    app/assets/stylesheets/scaffold.css

为什么会这样? 如何创建迁移文件?或者每次我需要创建并将其复制到db / migrate文件夹?

0 个答案:

没有答案