0

我从 Rails 开始,我遇到的第一个小问题是在教程中 - http://www.tutorialspoint.com/ruby-on-rails/rails-views.htm。上面写着模板必须命名为list.rhtml,但在这种情况下服务器找不到模板。但是当我将它重命名为列表时,它可以工作。但我希望该文件名为 list.rhtml

网址是

http://mydomain:3000/book/list.rhtml

错误是

  Missing template book/list, application/list with {:locale=>[:en], :formats=>[:html, :text, :js, :css, :ics, :csv, :png, :jpeg, :gif, :bmp, :tiff, :mpeg, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in: * "/home/mejmo/library/app/views"

控制器与http://www.tutorialspoint.com/ruby-on-rails/rails-controllers.htm相同

我认为这是服务器设置。

4

0 回答 0