Rails Home 索引文件未生成(或支持文件)

发布于 2024-09-27 15:05:35 字数 3058 浏览 2 评论 0原文

当我在终端运行时: Rails 生成控制器主目录索引

此文件“app/views/home/index.html.erb”。没有生成。

我确实得到了下面的内容。 。 。 。

=======

> 
> generate controller home index
>       create  
>       create  app/controllers
>       create  app/helpers
>       create  app/models
>       create  app/views/layouts
>       create  config/environments
>       create  config/initializers
>       create  config/locales
>       create  db
>       create  doc
>       create  lib
>       create  lib/tasks
>       create  log
>       create  public/images
>       create  public/javascripts
>       create  public/stylesheets
>       create  script/performance
>       create  test/fixtures
>       create  test/functional
>       create  test/integration
>       create  test/performance
>       create  test/unit
>       create  vendor
>       create  vendor/plugins
>       create  tmp/sessions
>       create  tmp/sockets
>       create  tmp/cache
>       create  tmp/pids
>       create  Rakefile
>       create  README
>       create  app/controllers/application_controller.rb
>       create  app/helpers/application_helper.rb
>       create  config/database.yml
>       create  config/routes.rb
>       create  config/locales/en.yml
>       create  db/seeds.rb
>       create  config/initializers/backtrace_silencers.rb
>       create  config/initializers/inflections.rb
>       create  config/initializers/mime_types.rb
>       create  config/initializers/new_rails_defaults.rb
>       create  config/initializers/session_store.rb
>       create  config/environment.rb
>       create  config/boot.rb
>       create  config/environments/production.rb
>       create  config/environments/development.rb
>       create  config/environments/test.rb
>       create  script/about
>       create  script/console
>       create  script/dbconsole
>       create  script/destroy
>       create  script/generate
>       create  script/runner
>       create  script/server
>       create  script/plugin
>       create  script/performance/benchmarker
>       create  script/performance/profiler
>       create  test/test_helper.rb
>       create  test/performance/browsing_test.rb
>       create  public/404.html
>       create  public/422.html
>       create  public/500.html
>       create  public/index.html
>       create  public/favicon.ico
>       create  public/robots.txt
>       create  public/images/rails.png
>       create  public/javascripts/prototype.js
>       create  public/javascripts/effects.js
>       create  public/javascripts/dragdrop.js
>       create  public/javascripts/controls.js
>       create  public/javascripts/application.js
>       create  doc/README_FOR_APP
>       create  log/server.log
>       create  log/production.log
>       create  log/development.log
>       create  log/test.log

When I run in terminal:
rails generate controller home index

This file, "app/views/home/index.html.erb." is not generated.

I did get what is below. . . .

=======

> 
> generate controller home index
>       create  
>       create  app/controllers
>       create  app/helpers
>       create  app/models
>       create  app/views/layouts
>       create  config/environments
>       create  config/initializers
>       create  config/locales
>       create  db
>       create  doc
>       create  lib
>       create  lib/tasks
>       create  log
>       create  public/images
>       create  public/javascripts
>       create  public/stylesheets
>       create  script/performance
>       create  test/fixtures
>       create  test/functional
>       create  test/integration
>       create  test/performance
>       create  test/unit
>       create  vendor
>       create  vendor/plugins
>       create  tmp/sessions
>       create  tmp/sockets
>       create  tmp/cache
>       create  tmp/pids
>       create  Rakefile
>       create  README
>       create  app/controllers/application_controller.rb
>       create  app/helpers/application_helper.rb
>       create  config/database.yml
>       create  config/routes.rb
>       create  config/locales/en.yml
>       create  db/seeds.rb
>       create  config/initializers/backtrace_silencers.rb
>       create  config/initializers/inflections.rb
>       create  config/initializers/mime_types.rb
>       create  config/initializers/new_rails_defaults.rb
>       create  config/initializers/session_store.rb
>       create  config/environment.rb
>       create  config/boot.rb
>       create  config/environments/production.rb
>       create  config/environments/development.rb
>       create  config/environments/test.rb
>       create  script/about
>       create  script/console
>       create  script/dbconsole
>       create  script/destroy
>       create  script/generate
>       create  script/runner
>       create  script/server
>       create  script/plugin
>       create  script/performance/benchmarker
>       create  script/performance/profiler
>       create  test/test_helper.rb
>       create  test/performance/browsing_test.rb
>       create  public/404.html
>       create  public/422.html
>       create  public/500.html
>       create  public/index.html
>       create  public/favicon.ico
>       create  public/robots.txt
>       create  public/images/rails.png
>       create  public/javascripts/prototype.js
>       create  public/javascripts/effects.js
>       create  public/javascripts/dragdrop.js
>       create  public/javascripts/controls.js
>       create  public/javascripts/application.js
>       create  doc/README_FOR_APP
>       create  log/server.log
>       create  log/production.log
>       create  log/development.log
>       create  log/test.log

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜宝宝 2024-10-04 15:05:35

使用Rails 2,您需要启动

./script/generate controller home index

rails生成命令仅适用于Rails 3

With Rails 2 you need launch

./script/generate controller home index

The rails generate command is only on Rails 3

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文