Rails Status 500 Internal Server Error
Contents |
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 Us Learn more
500 Internal Server Error Rails Ajax
about Stack Overflow the company Business Learn more about hiring developers or posting ads rails completed 500 internal server error with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack ruby completed 500 internal server error Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up how to debug a POST 500 internal server error up vote 2
Rails Post 500 (internal Server Error)
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 been through the controller with a fine tooth
Rails Internal Server Error
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, :status => :unprocessable_entity } format.json { render :json => [ {:error => "An error was encounter
here for a quick overview of the site Help Center Detailed 500 internal server error ruby on rails answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join http://stackoverflow.com/questions/10976912/how-to-debug-a-post-500-internal-server-error the Stack Overflow Community Stack Overflow is a community of 6.2 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 http://stackoverflow.com/questions/6123665/500-internal-server-error until I 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.titl
here for a quick overview of the site Help Center Detailed answers to any questions http://stackoverflow.com/questions/9017668/heroku-500-internal-server-error you might have Meta Discuss the workings and policies of this http://stackoverflow.com/questions/20056994/heroku-500-internal-server-error-on-broken-pages site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a internal server community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Heroku 500 Internal Server Error up vote 3 down vote favorite I am developing a Ruby on Rails app and attempting to deploy it with Heroku however I have some errors that I internal server error cannot solve. I have gone through the Heroku log and can see the details but I don't know what is wrong. The problem appears to me to be coming from my _header.html.erb file but I don't know why. Any help would be appreciated thanks. Here are the logs (apologies for the length): 2012-01-25T21:03:09+00:00 heroku[web.1]: State changed from bouncing to created 2012-01-25T21:03:10+00:00 heroku[web.1]: State changed from created to starting 2012-01-25T21:03:10+00:00 heroku[slugc]: Slug compilation finished 2012-01-25T21:03:12+00:00 heroku[web.1]: Starting process with command `thin -p 20848 -e production -R /home/heroku_rack/heroku.ru start` 2012-01-25T21:03:13+00:00 heroku[web.1]: Stopping process with SIGTERM 2012-01-25T21:03:13+00:00 app[web.1]: >> Stopping ... 2012-01-25T21:03:13+00:00 heroku[web.1]: Process exited 2012-01-25T21:03:15+00:00 app[web.1]: >> Thin web server (v1.2.6 codename Crazy Delicious) 2012-01-25T21:03:15+00:00 app[web.1]: >> Maximum connections set to 1024 2012-01-25T21:03:15+00:00 app[web.1]: >> Listening on 0.0.0.0:20848, CTRL+C to stop 2012-01-25T21:03:15+00:00 heroku[web.1]: State changed from starting to up 2012-01-25T21:03:42+00:00 app[web.1]: 2012-01-25T21:03:42+00:00 app[web.1]: 2012-01-25T21:03:42+00:00 app[web.1]: Started GET "/" for 109.77.209.45 at 2012-01-25 13:03:42 -0800 2012-01-25T21:03:42+00:00 app[web.1]: Processing by PagesController#home a
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 Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Heroku 500 Internal Server Error on broken pages up vote 0 down vote favorite My app is being hosted on Heroku and when I go to a broken page on my website (ie. www.example.herokuapp.com/mumbojumbo), i get a 500 Internal Server Error message. Obviously, when I go to a broken page something will go wrong, I would just prefer it to show the Oops error page that I made that's on an Amazson s3 like Heroku suggests. How can I fix this? Right now, I already have a custom Error Page that set up in Heroku. ruby-on-rails heroku ruby-on-rails-4 internal-server-error share|improve this question asked Nov 18 '13 at 20:16 Justin Licata 3,4002935 Did you set the Heroku config variable for the error page? devcenter.heroku.com/articles/error-pages#customize-pages –CDub Nov 18 '13 at 20:20 Yes I did set them already –Justin Licata Nov 18 '13 at 20:43 And restarted the dynos? –CDub Nov 18 '13 at 20:44 Yep when you set the variables it automatically restarts the app –Justin Licata Nov 18 '13 at 20:46 Seems like this was answered here: stackoverflow.com/questions/16351239/… It suggests a testing technique (from the doc) and an alternative to Heroku's error page. –Tal Nov 19 '13 at 9:58 add a comment| active oldest votes Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook. Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy a