Rails Post 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 about Stack Overflow 500 internal server error rails ajax the company Business Learn more about hiring developers or posting ads with us Stack completed 500 internal server error rails Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of ruby completed 500 internal server error 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 down vote favorite I'm trying to
Rails Internal Server Error
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 comb, but I can't work out what is causing 500 internal server error ruby on rails 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 encountered while processing your photos. Please try again."}], status: 304 } format.js end end end def update @photo = Photo.f
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 ajax 500 internal server error Stack Overflow the company Business Learn more about hiring developers or posting ads with
Rails Ajax Form
us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is
500 Internal Server Error Ajax Post
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 in rails with ajax up vote 1 down vote favorite http://stackoverflow.com/questions/10976912/how-to-debug-a-post-500-internal-server-error I am trying to make a text box that displays a list of sorted users that sorts per every typed letter. From there the person can add the user as a collaborator. The result should be kind of like facebook's search feature when you are searching to add new friends. When I press a key I see a new 500 internal server error in the network section of the browsers console. http://stackoverflow.com/questions/25952212/500-internal-server-error-in-rails-with-ajax Here is a snippet of the response:
NoMethodError in CollaborationsController#collaboration_search
undefined method `[]' for nil:NilClass
So I think the ajax is getting fired to the server but there is something wrong with the controller. Here is my code for the view, views/collaborations/_new.html.erb: <%= form_for [wiki, collaboration] do |f|%>Sign in Pricing Blog Support Search GitHub This repository https://github.com/spree/spree/issues/2517 Watch 451 Star 7,884 Fork 3,669 spree/spree Code Issues 137 Pull requests 77 Projects 0 Wiki Pulse Graphs New issue POST /orders/populate 500 http://www.codeproject.com/Questions/653678/Internal-Server-Error-when-pass-data-in-ajax?arn=5960 Internal Server Error on ajax cart update #2517 Closed sibsfinx opened this Issue Feb 2, 2013 · 8 comments Labels None yet internal server 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, ... and handling events with .on('ajax:success') .on('ajax:error') and so on. I've added internal server error 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, :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/popula
Tips/Tricks Top Articles Beginner Articles Technical Blogs Posting/Update Guidelines Article Help Forum Article Competition Submit an article or tip Post your Blog quick answersQ&A Ask a Question View Unanswered Questions View All Questions... Linux questions C# questions ASP.NET questions SQL questions fabric questions discussionsforums All Message Boards... Application Lifecycle> Running a Business Sales / Marketing Collaboration / Beta Testing Work Issues Design and Architecture ASP.NET JavaScript C / C++ / MFC> ATL / WTL / STL Managed C++/CLI C# Free Tools Objective-C and Swift Database Hardware & Devices> System Admin Hosting and Servers Java .NET Framework Android iOS Mobile SharePoint Silverlight / WPF Visual Basic Web Development Site Bugs / Suggestions Spam and Abuse Watch features Competitions News The Insider Newsletter The Daily Build Newsletter Newsletter archive Surveys Product Showcase Research Library CodeProject Stuff communitylounge Who's Who Most Valuable Professionals The Lounge The Insider News The Weird & The Wonderful The Soapbox Press Releases Non-English Language > General Indian Topics General Chinese Topics help What is 'CodeProject'? General FAQ Ask a Question Bugs and Suggestions Article Help Forum Site Map Advertise with us About our Advertising Employment Opportunities About Us Ask a Question All Questions All Unanswered FAQ 500 Internal Server Error when pass data in $.ajax Rate this: Please Sign up or sign in to vote. See more: C# ASP.NET Ajax jQuery hello, i want pass data in $.ajax but when i run project i get null data in c# code and get 500 Internal Server Error in inspect element my code is : function refreshTime(options) { $.ajaxService({ url: 'http://localhost:1549/Store/Pages/services.aspx?ServiceName=hello-world', data:{ oldpassword: $('#oldpassword').val(), newpassword: $('#newpassword').val() }, onStartService: function () { $(options.target).addClass('loading'); }, onEndService: function () { $(options.target).removeClass('loading'); }, onResponse: function (response) { if (response.result == '1') { $.pushMessage({ message: 'success changed', messageClass: 'success-message', delay: 3000 }); } else { $.pushMessage({ message: 'error in change password', messageClass: 'success-