On Monday, August 24, 2015 at 9:28:12 AM UTC+1, iampraveennarah...@gmail.com wrote: > > Hi friends , I am modifying virtualX open source application. I wanted to > introduce new functionality that is uploading questions from .csv file and > storing those questions to the database. I am very new to ruby this task > becomes very tough for me . So i referred so many websites and blogs and i > ready some code for this feature . but this is code is not working . I am > getting HTTP 500 error . As i checked code in Aptanan Studio , it is > showing some errors. I am posting my code over here . Please help me > friends . I am really not getting what is happening . > > Check your log file (development.log) - it should contain extra details about the problem (such as a stack trace)
> I am using Ruby 1.8.7 > Rails 3.0.3 > > Just fyi, both of these 2 release series are unmaintained. Rails 3.0.3 has several remote code execution flaws > > if @question.count == 1 > @question.first.update_attributes(question_hash) > else > Question.save!(question_hash) > end # end if !@question.nil? > This line looks fishy - there is no class method called save!. Perhaps you meant create! ? Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/682f79ac-86ce-469d-9f1c-10272ef28b04%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.