Rails Passenger 500 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 the
Rails 500 Error Page
company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions rails 500 error no log Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million
Rails 500 Error Log
programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to properly diagnose a 500 error (Rails, Passenger, Nginx, Postgres) up vote 3 down vote favorite 2 I'm having rails internal server error a real tough time diagnosing a 500 error from my application running in production. I've had it working before, but after re-deploying via Capastrano I am unable to get it going. Here are the facts: The server is setup with nginx + passenger, and I'm using PostgreSQL. Static assets are working properly, as in I'm able to access them just fine in a browser. I can access the rails console via RAILS_ENV=production bundle exec rails 500 internal server error rails console and perform Active Record actions (like retrieving data from the db). Within console, I can run app.get("/"), which returns a 500 error as well (after first showing the query that was run to load the model). The production.log file is never written to. I've set permissions 777 on it just for the hell of it. I've also set the log level to :debug with nothing to show for it. The nginx log (which passenger also uses) shows no indication of errors, it just notifies about cache misses. Because nothing of use is being logged, I have no idea what to do here. I've tried setting full permission on the entire app directory with no help. Restarted the server multiple times, nothing. The database is there and rails can clearly communicate with it. I'm not sure what I did to get it to run the first time around. I just don't know why rails isn't outputting anything to the log. ruby-on-rails ruby-on-rails-3 nginx passenger capistrano share|improve this question asked Apr 2 '12 at 1:49 Brian 1,95942247 add a comment| 3 Answers 3 active oldest votes up vote 6 down vote accepted Okay, I figured this out. The app ran fine in development mode, so I knew something production-specific was screwing it up. I went into config/environments/production.rb and
Sign in Pricing Blog Support Search GitHub This repository Watch 137 Star 3,598 Fork 452 phusion/passenger Code Issues 156 Pull requests 5 Projects 0 Wiki Pulse Graphs New issue 500 error but no log messages. #500 Closed FooBarWidget opened this Issue May 29, 2014 · 3 comments Labels None yet Milestone No milestone Assignees No one assigned 1 participant Phusion B.V. member FooBarWidget commented May 29, 2014 From gokulj on October 09, 2009 11:27:50 Rails apps throws a 500 error but http://stackoverflow.com/questions/9970028/how-to-properly-diagnose-a-500-error-rails-passenger-nginx-postgres there is nothing in the production.log file. Rails version 2.3.3 Using Passenger 2.2.5 (Apache) with REE - ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 20090928 Ubuntu 8.04 With PassengerLogLevel of 3, I see no errors in apache's error.log as well. Other Rails apps (Rails 2.1.0, Rails 2.3.2) work fine. Original issue: http://code.google.com/p/phusion-passenger/issues/detail?id=400 Phusion B.V. member FooBarWidget https://github.com/phusion/passenger/issues/500 commented May 29, 2014 From adams.brad on April 09, 2010 11:15:45 Same for me. Debian Squeeze Rails 2.3.5 Passenger 2.2.11 REE 1.8.7 (2009-12-24 patchlevel 248) Nginx 0.8.35 Ngnix still hosts everything else, but any Passenger sites give me 500's with no Ngnix errors and nothing in my Rails app's production.log. Phusion B.V. member FooBarWidget commented May 29, 2014 From adams.brad on April 09, 2010 13:10:42 Looks like the non-logging is a Rails bug. https://rails.lighthouseapp.com/projects/8994/tickets/3577-failsafe-middleware-should-flush-the-logger Phusion B.V. member FooBarWidget commented May 29, 2014 From honglilai on April 12, 2010 03:17:07 Yes it is a Rails bug. I hope they'll release 2.3.6 soon. Status: Invalid FooBarWidget closed this May 29, 2014 Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. Terms Privacy Security Status Help You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
ElanceEventsSubsidiariesCareersWhy Join Us?Team TestimonialsHelp BlogWhy Choose Us?Cost EfficientMinimal Time linesEffective CommunicationQuality StandardsLifetime SupportProject ManagementOutsourcingProductsServicesMobile ApplicationsWeb DevelopmentOpen SourceWeb ApplicationsWeb PortaleCommerce SolutionsPlanning PhaseBusiness PlanningCompetitive AnalysisStrategy & BrandingDomain Name SelectionPlatform SelectionExecution PhaseDesigningDevelopmentPayment Gateways IntegrationContent WritingMarketingSEO & http://www.discretelogix.com/blog/ruby-rails/500-error-with-rails-application-running-in-production-via-apache2-passenger SEMPPC ManagementReferral & Affiliate MarketingEmail MarketingSocial Media MarketingLive Chat SoftwarePost http://www.redmine.org/boards/2/topics/10694?r=10697 Launch Analysis & OptimizationsWebmaster ToolsAnalysis ToolsWeb & Graphics DesigningBannersBrochuresCorporate IdentityeBay TemplatesEmail NewslettersFacebook DesignsFlash DesignsImage EditingLanding PagesLogo DesignsMobile ApplicationsWebsite TemplatesQuality AssuranceSEOTechnical SupportPortfolioMobileWebDesignLogoBrandingCorporate IDPrintGraphicsClientsWorldwideIndustriesOur ClientsTestimonialsFAQsExpertiseMobile AppsAndroid ApplicationsiOS ApplicationsWeb ProgrammingAJAXAPIASP.netGame EnginesHTML/CSSJavaScript / JQueryJSPPHPDatabasesMicrosoft AccessMicrosoft SQL ServerMySQLDesigningCorel DrawIllustratorPhotoshopMultimedia & AnimationContact Us BetaTweet 500 error Home > Help Blog > Ruby / Ruby on Rails > 500 error with rails application running in production via apache2 & passenger Help Blog, Ruby / Ruby on Rails 500 error with rails application running in production via apache2 & passenger Sadaf Rasheed January 7, 2015 No rails 500 error Comments I sometimes face 500 Internal Server Error when running Ruby on Rails application on Apache Passenger but the same application is working fine with webrick server. One of the following reasons are responsible for the issue. 1. Permission Issues Check permission of the files and directories of your project. It should be writeable by the user running webserver. 2. Check your database settings Check your database settings in config/database.yml file. Make sure that the database specified in production settings exists and username/password is correct. 3. Secret Key Base: Make sure you have provided a value for secret_key_base in your config/secrets.yml file. The most easier way to do this is to manually set it in secrets.yml file. In the ternimal of your server, execute RAILS_ENV=production rake secret Copy the generated string and paste it in your secret.yml file inplace of<%= ENV["SECRET_KEY_BASE"] %> Don
ago I'm using 0.8-stable from svn. I've configured everything as outlined in the installation guide. Everything runs beautifully when started in WEBrick. Running in Apache, however, yields a 500 error that appears to be echo'd by Redmine, not Apache's default. I'm using Ruby Enterprise Edition on Ubuntu 8.04. Here's my setup: Ruby version 1.8.7 (i686-linux) RubyGems version 1.3.5 Rails version 2.1.2 Active Record version 2.1.2 Action Pack version 2.1.2 Active Resource version 2.1.2 Action Mailer version 2.1.2 Active Support version 2.1.2 Application root /usr/share/redmine/redmine-0.8 Environment production Database adapter mysql Database schema version 101 Here is the production.log output: /!\ FAILSAFE /!\ Tue Jan 12 14:22:02 -0500 2010 Status: 500 Internal Server Error No route matches "/index.html" with {:method=>:get} /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/routing/recognition_optimisation.rb:67:in `recognize_path' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/routing/route_set.rb:385:in `recognize' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:148:in `handle_request' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:107:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:104:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:104:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:35:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/railz/request_handler.rb:50:in `process_request' /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop' /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/railz/application_spawner.rb:378:in `start_request_handler' /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/railz/application_spawner.rb:181:in `spawn_application!' /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/utils.rb:183:in `safe_fork' /usr/