Question

Whenever I start my rails server And run resume builder I'm getting the following error:

root/app/controllers/resumes_controller.rb:38: syntax error, unexpected keyword_end

root/app/controllers/resumes_controller.rb:121: syntax error, unexpected keyword_end

root/app/controllers/resumes_controller.rb:131: syntax error, unexpected $end, expecting keyword_end

Heres my resumes_controller.rb file lines 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

and heres my line 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 

and finally lines 126-131

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

Please Help!

Était-ce utile?

La solution

Two first: Remove coma after:

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

Last one: will need more context - you have unclosed block somewhere.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top