Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 728783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:43:16+00:00 2026-05-14T06:43:16+00:00

I’ve been trying to fix a bug in the Rails app I’m developing, and

  • 0

I’ve been trying to fix a bug in the Rails app I’m developing, and I keep getting a blank screen with no errors. I haven’t found anything helpful in development.log, either (though it does show queries being run and such).

Finally, I started to wonder if it’s somehow set not to show errors anymore. I tried commenting out a necessary route, and sure enough, I got a blank page instead of the error and stack trace I expected.

What might cause this?

(I wondered if maybe I’m accidentally running production mode and errors aren’t supposed to show then, but development.log is being appended, and if I open script/console and echo ENV['RAILS_ENV'], it says development.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:43:17+00:00Added an answer on May 14, 2026 at 6:43 am

    How I broke it, how I fixed it, and how I learned my lesson

    I figured out the problem while lying in bed this morning, and it boils down to "I did something stupid." (Doesn’t it always?)

    The smart part

    First, the smart part: I followed some neat advice about setting up access control and permissions. It gives you some great a great syntax for saying what’s allowed, like this:

    <%= link_to 'Delete', @photo, :confirm => "Really delete this photo?", :method => :delete if current_user.can_delete?(@photo)%>
    

    (The current_user bit comes from the Restful-authentication plugin.)

    The author also shows how to handle the case where a user tries to type in a URL for which you haven’t given them a link. It involves setting up a special exception class, which subclasses StandardError, and handling it with something like a 401.html – access denied.

    The stupid part

    What I did that was stupid was I followed his example blindly. He shows this:

    def rescue_action(e)
        case e
        when SecurityTransgression
          head :forbidden
        end
    end
    

    …which handles the SecurityTransgression fine, but breaks the default error handling in Rails. (I’m sure the author knows this and dealt with it, but he didn’t discuss it.)

    The solution

    The solution was to add two lines:

    def rescue_action(e)
        case e
        when SecurityTransgression
          head :forbidden
        else
          super
        end
    end
    

    The "else super" part says "if I haven’t specified anything here, let the inherited rescue_action method handle it."

    Now I’m getting the correct stack trace for my original problem, and will proceed to troubleshoot it.

    The lesson: be careful when you mess with exception handling, and make sure the default case still works!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.