avm_69 avm_69 - 5 months ago 23x
Ruby Question

Missing Template Rails

When I run my code on Cloud9 IDE, the next error appears:

Missing partial submissions/_submission with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in: * "/usr/local/rvm/gems/ruby-2.3.0/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates" * "/home/ubuntu/workspace/app/views" * "/usr/local/rvm/gems/ruby-2.3.0/gems/web-console-2.0.0.beta3/app/views"

I have a Submissions Controller and my create code is like this:

def create
@submission = Submission.new(submission_params)

respond_to do |format|
if @submission.save
format.html { redirect_to root_path}
format.json { render :show, status: :created, location: @submission }
format.html { render :new }
format.json { render json: @submission.errors, status: :unprocessable_entity }

I don't know which is my error and where to locate it.

Plus, a full stack text http://pastebin.com/YnyQeetU

The code of index.html.erb http://pastebin.com/fZbXd0Wk

dkp dkp

This line of code is causing the problem.

<!--<%= render @submissions %>--> 
#<!-- --> This is used to comment an HTML tag

If you do not want to render the partial you can simply comment that out as follows:

<%#= render @submissions %>
#<%# %> This is the way to comment embedded ruby code