500 Internal Server Error Rails 3
Contents |
here for a quick overview of the site Help Center Detailed answers 500 internal server error rails ajax to any questions you might have Meta Discuss the workings rails completed 500 internal server error and policies of this site About Us Learn more about Stack Overflow the company Business rails post 500 (internal server error) Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the
Ruby Completed 500 Internal Server Error
Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up 500 Internal Server Error up vote 4 down vote favorite 1 I'm following the tutorial here: http://guides.rubyonrails.org/getting_started.html Everything was working fine until I ajax 500 internal server error tried "8.1 Rendering Partial Collections" I started getting this error message: 500 Internal Server Error If you are the administrator of this website, then please read this web application's log file and/or the web server's log file to find out what went wrong. In the development log file I have: Started GET "/posts/3" for 127.0.0.1 at 2011-05-24 16:53:35 +0300 Processing by PostsController#show as HTML Parameters: {"id"=>"3"} [1m[36mPost Load (0.2ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 3 LIMIT 1[0m ERROR: compiling _app_views_posts_show_html_erb___599541849308356030_2168837280__3307996878912411319 RAISED /Users/username/Projects/blog/app/views/posts/show.html.erb:20: syntax error, unexpected tASSOC, expecting ')' ... :collection => @post.comments );@output_buf... ... ^ Function body: def _app_views_posts_show_html_erb___599541849308356030_2168837280__3307996878912411319(local_assigns) _old_virtual_path, @_virtual_path = @_virtual_path, "posts/show";_old_output_buffer = @output_buffer;;@output_buffer = ActionView::OutputBuffer.new;@output_buffer.safe_concat('
');@output_buffer.append= ( notice );@output_buffer.safe_concat('
Name: ');@output_buffer.append= ( @post.name );@output_buffer.safe_concat(' ');@output_buffer.safe_concat('
What's wrong? Please help. EDIT: views/posts/show.html.erb:<%= notice %>
Name: <%= @post.name %>
Title: <%= @post.title %>
Content:
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About rails ajax form Us Learn more about Stack Overflow the company Business Learn more about hiring
500 Internal Server Error Ajax Post
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the
Rails Render Json
Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up how to debug a POST 500 http://stackoverflow.com/questions/6123665/500-internal-server-error internal server error up vote 2 down vote favorite I'm trying to set up jquery file upload on a Rails 3.2 app, following this guide. Everything is almost working perfectly but, when I click "start upload" I see an error in Chrome's console: POST http://testapp.dev/photos 500 (Internal Server Error) In the log I'm getting: ActionView::MissingTemplate (Missing template photos/create, application/create with {:locale=>[:en], :formats=>[:js, :html], :handlers=>[:erb, :builder, :coffee]}. I've http://stackoverflow.com/questions/10976912/how-to-debug-a-post-500-internal-server-error been through the controller with a fine tooth comb, but I can't work out what is causing this error or why its looking for a create partial. What is a systematic way to debug this? Thanks EDIT My controller actions look like this: class PhotosController < ApplicationController def index @photos = Photo.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @photos } format.json { render :json => @photos.collect { |a| a.to_jq_upload }.to_json } format.js { render :json => @photos.collect { |a| a.to_jq_upload }.to_json } end end def show @photo = Photo.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @photo } format.json { render :json => @photo } format.js end end def new @photo = Photo.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @photo } format.json { render :json => @photo } format.js end end def edit @photo = Photo.find(params[:id]) end def create @photo = Photo.new(params[:photo]) respond_to do |format| if @photo.save format.html { render :json => [@photo.to_jq_upload].to_json, :content_type => 'text/html', :layout => false } format.json { render :json => [ @photo.to_jq_upload].to_json } format.js else format.html { render :action => "new" } format.xml { render :xml => @photo.errors
Support Search GitHub This repository Watch 449 Star 7,838 Fork 3,649 spree/spree Code Issues 126 Pull requests 69 Projects 0 Wiki Pulse Graphs https://github.com/spree/spree/issues/2517 New issue POST /orders/populate 500 Internal Server Error on ajax cart update #2517 Closed sibsfinx opened this Issue Feb 2, 2013 · 8 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 3 participants sibsfinx commented Feb 2, 2013 Hello, I'm adding a product to cart with = form_for :order, :url => populate_orders_path, :remote => true, internal server ... and handling events with .on('ajax:success') .on('ajax:error') and so on. I've added in orders_controller respond_to :html, :js and (in def populate) respond with(@order) do |format| format.html { redirect_to cart_path } format.js end but I'm getting the following error: (javascript console) POST http://localhost/orders/populate 500 (Internal Server Error) (server log) ActionView::MissingTemplate - Missing template spree/orders/populate, spree/store/populate, spree/base/populate, application/populate with {:locale=>[:ru], :formats=>[:js, :html], :handlers=>[:erb, internal server error :builder, :coffee, :haml, :rabl], :versions=>[:v1]}. Spree Commerce member radar commented Feb 3, 2013 Please show us your Gemfile. … On 03/02/2013, at 4:39, Alexander Mescheryakov ***@***.***> wrote: Hello, I'm adding a product to cart with = form_for :order, :url => populate_orders_path, :remote => true, ... and handling events with .on('ajax:success') .on('ajax:error') and so on. I've added in orders_controller respond_to :html, :js and (in def populate) respond ***@***.***) do |format| format.html { redirect_to cart_path } format.js end but I'm getting the following error: (javascript console) POST http://localhost/orders/populate 500 (Internal Server Error) (server log) ActionView::MissingTemplate - Missing template spree/orders/populate, spree/store/populate, spree/base/populate, application/populate with {:locale=>[:ru], :formats=>[:js, :html], :handlers=>[:erb, :builder, :coffee, :haml, :rabl], :versions=>[:v1]}. — Reply to this email directly or view it on GitHub. sibsfinx commented Feb 3, 2013 source 'https://rubygems.org' gem 'rails', '3.2.11' gem 'rails-i18n' gem 'sqlite3' gem 'haml-rails', '~> 0.3.5' gem "libv8", '~> 3.3.10' gem 'therubyracer','~> 0.10.2' gem 'pg' group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' gem 'bootstrap-sass', '~> 2.2.2.0' gem 'uglifier' end group :development do gem 'capistrano' gem 'mailcatcher' gem 'guard' gem 'rb-inotify', :require => false gem 'r