Completed 500 Internal Server Error Rails
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 the completed 500 internal server error rails 3 company Business Learn more about hiring developers or posting ads with us Stack Overflow 500 internal server error ruby on rails Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 completed 500 internal server error in 2ms million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Ruby on Rails - Completed 500 internal error on f.label up vote 2 down vote favorite EDIT Here's the project 500 internal server error rails ajax on GitHub: https://github.com/lionelrudaz/myteam2 I'm making my first application in Ruby on Rails by using the template on Railsapp (Twitter Bootstrap, Devise and CanCan). I've also made the necessary steps to publish my app to Heroku. Everything went fine so far, first publication on Heroku was alright, until I restarted the server on my MacBook Pro. Now I get always the default error page with message "We're sorry, but something went wrong." In the
Completed 500 Internal Server Error Heroku
terminal, I get: => Booting Thin => Rails 3.2.8 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server >> Thin web server (v1.5.0 codename Knife) >> Maximum connections set to 1024 >> Listening on 0.0.0.0:3000, CTRL+C to stop Started GET "/" for 127.0.0.1 at 2012-10-01 19:19:21 +0200 Processing by HomeController#index as HTML User Load (0.3ms) SELECT "users".* FROM "users" Club Load (0.2ms) SELECT "clubs".* FROM "clubs" ORDER BY "clubs"."id" DESC LIMIT 1 Rendered home/index.html.erb within layouts/application (23.2ms) Completed 500 Internal Server Error in 190ms Since I don't know how to disable the error page to get a real stack trace, I've started to remove lines of code by lines of code to find which line isn't working. Actually, it looks like the f.label instructions aren't working anymore. I know they did, I've used my app for a long time. Here's my home_controller.rb file class HomeController < ApplicationController def index @users = User.all @club = Club.last end end index.html.erb
Home
<%= debug @club %> <%= form_for @club do |f| %>User: <%=link_to user.name, user %>
<% end %> The error is fired when Ihere for a quick overview of the site Help Center
Redmine Completed 500 Internal Server Error
Detailed answers to any questions you might have Meta rails post 500 (internal server error) Discuss the workings and policies of this site About Us Learn more about Stack Overflow rails internal server error the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x http://stackoverflow.com/questions/12678902/ruby-on-rails-completed-500-internal-error-on-f-label Dismiss Join the 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 Internal server error with ruby on rails up vote 0 down vote favorite Trying to make this ajax http://stackoverflow.com/questions/36573136/internal-server-error-with-ruby-on-rails call work.But I get the 500 Internal server error. Updated: Script.js $.ajax({ type: "GET", url: '/books/103/last_chapter.json', success: function(data) { $("body").append(data); }, error: function(xhr, status, response) {console.log('response ' + response + ' , xhr' + xhr + ' , ' + 'STATUS ' + status)} }); Chapter controller: def last_chapter Chapter.order(created_at: :desc).limit(1) respond_to do |format| format.js end end config.routes resources :books do member do get '/last_chapter/', to: 'chapters#last_chapter', as: 'last_chapter' end resources :chapters end How the route looks in the terminal: last_chapter_book GET /books/:id/last_chapter(.:format)chapters#last_chapter The error in terminal Started GET "/books/103/last_chapter" for 127.0.0.1 at 2016-04-12 14:17:37 +0200 Processing by ChaptersController#last_chapter as */* Parameters: {"id"=>"103"} Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.0ms) ActionView::MissingTemplate (Missing template chapters/last_chapter, application/last_chapter with {:locale=>[:en], :formats=>[:js, :html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in: * "/Users/namek/myrails/app/views" ): app/controllers/chapters_controller.rb:28:in `last_chapter' last_chapter.json json.extract! @last_chapter, :id, :title, :characters, :created
PostgreSQL Join the Community! Creating your account only takes a https://community.spiceworks.com/topic/530134-cannot-render-html-erb-completed-500-internal-server-error few minutes. Join Now I have begun converting a Postgres database to mysql and suddenly cannot render my other webpages. I am trying to get http://reinhartsample.com/coffee and other pages to render. They were working before I changed my gem file and ran bundle install to convert to mysql.The index page comes internal server up just fine but everything else gets a message We're sorry, but something went wrong. When I look at the log file I can see the following errors. TextActiveRecord::StatementInvalid (Mysql2::Error: No database selected: SHOW FULL FIELDS FROM `tea_orders`): app/controllers/home_controller.rb:17:in `new' app/controllers/home_controller.rb:17:in `tea' Started GET "/crunchytoppings" for xx.xx.xx.xx at 2014-06-30 internal server error 11:42:00 -0500 Processing by HomeController#crunchytoppings as HTML Completed 500 Internal Server Error in 2ms ActiveRecord::StatementInvalid (Mysql2::Error: No database selected: SHOW FULL FIELDS FROM `ct_orders`): app/controllers/home_controller.rb:10:in `new' app/controllers/home_controller.rb:10:in `crunchytoppings' Started GET "/coffee" for xx.xx.xx.xx at 2014-06-30 11:42:02 -0500 Processing by HomeController#index as HTML Completed 500 Internal Server Error in 2ms ActiveRecord::StatementInvalid (Mysql2::Error: No database selected: SHOW FULL FIELDS FROM `orders`): app/controllers/home_controller.rb:3:in `new' app/controllers/home_controller.rb:3:in `index' Now I have not setup the databases the sites will write to yet, but that shouldn't cause the sites to fail to render. All the database will be doing is taking entries and storing them. Has anyone run into this issue before. Here is my home controller setup.Textclass HomeController < ApplicationController def index @order = Order.new @header = 'coffee_header.html.erb' @footer = 'coffee_footer.html.erb' @title = "Coffee Roasters" end def crunchytoppings @order = CtOrder.new @header = 'ct_header.html.erb' @footer = 'ct_footer.html.erb' @title = "Crunchy Topping