2012-06-07 169 views
2

嘿,我也跟着在軌道上引導紅寶石當我試圖運行它,我得到了下面的錯誤,我不知道如何解決它:缺少部分

ActionView::MissingTemplate in Posts#new 

Showing /home/jandre/Downloads/RubyForRails/blog/app/views/posts/_form.html.erb where line #29 raised: 

Missing partial tags/form with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in: 
    * "/home/jandre/Downloads/RubyForRails/blog/app/views" 

Extracted source (around line #29): 

26: </div> 
27: <h2>Tags</h2> 
28: <%= render :partial => 'tags/form', 
29:    :locals => {:form => f} %> 
30: <div class="actions"> 
31:  <%= f.submit %> 
32: </div> 

Trace of template inclusion: app/views/posts/new.html.erb 

Rails.root: /home/jandre/Downloads/RubyForRails/blog 


app/views/posts/_form.html.erb:29:in `block in _app_views_posts__form_html_erb__1175061583764259658_69931731368600' 
app/views/posts/_form.html.erb:2:in `_app_views_posts__form_html_erb__1175061583764259658_69931731368600' 
app/views/posts/new.html.erb:3:in `_app_views_posts_new_html_erb___2345045124576917782_69931899129680' 
app/controllers/posts_controller.rb:33:in `new' 

回答

3

這個錯誤意味着你沒有有_form部分在應用程序/視圖/標籤

+0

tnx說Kaldybaev老兄我看到我有一個錯誤的文件。 – Ghost

1

確保您部分文件名startes用下劃線:

_somepartial.html.erb而非somepartial.html.erb