Ruby on rails RAILS错误:ResumesController中的SyntaxError#新建

Ruby on rails RAILS错误:ResumesController中的SyntaxError#新建,ruby-on-rails,ruby,ruby-on-rails-3,Ruby On Rails,Ruby,Ruby On Rails 3,每当我启动rails服务器并运行resume builder时,都会出现以下错误: root/app/controllers/resumes\u controller.rb:38:语法错误,意外的关键字\u end root/app/controllers/resumes\u controller.rb:121:语法错误,意外的关键字\u end root/app/controllers/resumes\u controller.rb:131:语法错误,意外$end,应为关键字\u end 这是

每当我启动rails服务器并运行resume builder时,都会出现以下错误:

root/app/controllers/resumes\u controller.rb:38:语法错误,意外的关键字\u end

root/app/controllers/resumes\u controller.rb:121:语法错误,意外的关键字\u end

root/app/controllers/resumes\u controller.rb:131:语法错误,意外$end,应为关键字\u end

这是我的简历_controller.rb文件第25-40行

     # GET /resume/1
     # GET /resume/1.json
     def show
@resume = current_user.resumes.find(params[:id])
layout = current_user.resumes.find(params[:id]).layout || "application"
respond_to do |format|
  format.html # show.html.erb
  format.json { render json: @resume }
  format.pdf do
    render :pdf => "file_name",
    :layout   => "resumes/#{layout}.pdf.erb",
    :temwkhtmltopdfplate => "resumes/pdf_layouts/show.html.erb",
    :wkhtmltopdf  => Rails.root.join('bin', 'wkhtmltopdf-amd64').to_s,
  end
end
end
这是我的第111-124行

     def short_link
@resume = Resume.where(short_link: params[:short_link]).first
layout = @resume.layout || "application"
respond_to do |format|
  format.html {  render layout: @resume.layout }# show.html.erb
  format.pdf do
    render :pdf => "file_name",
    :layout   => "resumes/#{layout}.pdf.erb",
    :template => "resumes/pdf_layouts/show.html.erb",
    :wkhtmltopdf  => Rails.root.join('bin', 'wkhtmltopdf-amd64').to_s,
  end
end
end 
最后是第126-131行

      private
  def correct_user
    user = User.find(params[:user_id])
    redirect_to root_path unless current_user?(user)
  end
  end

请帮忙

两个优先:在以下情况下移除昏迷:

:wkhtmltopdf  => Rails.root.join('bin', 'wkhtmltopdf-amd64').to_s,

最后一个:将需要更多的上下文-您在某个地方有未关闭的块。

哇,真棒解决了前两个问题,就像您所说的谢谢。虽然最后一个错误仍然存在on@HabeebSulu-我们需要查看更多最后的代码。不幸的是,这个错误通常很难找到——您在某个地方打开了一个块,但它尚未关闭。它可能是类定义、某些方法、任何
do end
循环。无法从您发布的代码中找到错误。谢谢Broisasse错误已经消失,现在出现了一个新的错误。我正在本地主机上测试一个脚本,我是Ruby的新手。下面是显示C:/Sites/resummonk master/app/views/resumes/_form.html.erb的错误,其中第67行出现:root//app/views/resumes/_form.html.erb:67:语法错误,意外关键字\u do\u block…=f.fields\u用于:教育,做|教育|形式| | | |输出| | | | | | | | | | | | | | | | | | | | | | |