hsribei / goalie Goto Github PK
View Code? Open in Web Editor NEWCustom error pages for Rails
License: MIT License
Custom error pages for Rails
License: MIT License
Using Goalie's PublicErrorsController
(i.e. not overriding it) will render your public_errors
views, but without the application layout.
If you override the controller with your own, the application layout is used.
Is this intentional?
Using Rails 3.0.5, Ubuntu 10, goalie 0.0.4
Followed the instructions but for certain actions I get the following error in the logfile
Error during failsafe response: Missing template public_errors/internal_server_error ....
The directory public_errors exist, and the file internal_server_error.html and internal_server_error.html.erb exists.
The web browser displays the standard Rails error 500 (?)
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.
The controller is per your example, but using a layout
class PublicErrorsController < ApplicationController layout "fatal_errors" #403 def forbidden end #404 def not_found end #405 def method_not_allowed render :action => 'internal_server_error' end #409 def conflict render :action => 'internal_server_error' end #422 def unprocessable_entity end #500 def internal_server_error end #501 def not_implemented render :action => 'internal_server_error' end end
Hi,
I tried out your gem this morning and it looks like a very promising solution to (what I see) as a problem in Rails 3. After trying differing solutions all morning yours is the only solid one. I'm very close to getting it working fully but have two issues off getting it perfect.
The first is that my current_user (via devise) is throwing an error
Error during failsafe response: ActionView::Template::Error
/Users/jack/.rvm/gems/ruby-1.9.2-p0/gems/activemodel-3.0.3/lib/active_model/attribute_methods.rb:364:in method_missing' /Users/jack/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/attribute_methods.rb:46:in
method_missing'
/Users/jack/Code/oxnotes3/app/helpers/application_helper.rb:3:in current_seller' /Users/jack/Code/oxnotes3/site/app/views/shared/_nav_bar.html.erb:2:in
_site_app_views_shared__nav_bar_html_erb___737376405_689060__547631846'
/Users/jack/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.3/lib/action_view/template.rb:135:in `block in render'
The second (related) is that some of my preferences (e.g. image to be displayed on layout) is determined at db level and this isn't working either.
I'm thinking this might mean that Goalie is having issues db issues? Any ideas? Roads I should explore?
Jack
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.