better_errors: better_errors does not report the actual error and gives wrong line.

Actual error in terminal:

SyntaxError - 
app/controllers/namespace/my_controller.rb:15: syntax error, unexpected tSTRING_BEG, expecting '}'
    "update" => [
     ^
app/controllers/namespace/my_controller.rb:15: syntax error, unexpected =>, expecting keyword_end
    "update" => [
               ^
app/controllers/namespace/my_controller.rb:18: syntax error, unexpected '}', expecting keyword_end:
  activesupport (4.0.2) lib/active_support/dependencies.rb:424:in `'
  activesupport (4.0.2) lib/active_support/dependencies.rb:424:in `block in load_file'

However, the error from better errors jumps right to activesupport instead of showing the proper file which is at the head of the error, it also shows activesupports code, instead of the controller that caused the error. There is no application trace even available for the error either which is fine, but if it’s going to force it to full stack then shouldn’t it show the full error?

This is on Rails 4.0.2 btw.

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 23 (2 by maintainers)

Most upvoted comments

@jmarkbrooks If this is about me. It is pretty obvious you didn’t or are unable to even do the most basic due diligence before making such an ignorant comment.

Hilarious. I came across this by googling on something else – amazing how some people think they have a license to be asshats when looking for unpaid assistance with free code. But that’s the internet.

Do you not find irony in saying “don’t waste your time” while wasting others time and your own?

If by “form of argument” you mean filled with incoherent insults then sure.

Such a long winded way to be what you are calling somebody else while being arrogant & petty. The sheer amount of irony and lack of self reflection in your entire statement is delicious.

Try harder son, you need to gain more levels to compete with this boss.

Also, I didn’t ask him for help. I reported a problem I fixed locally to @charliesome

You are no better so stick your better than you attitude up your ass and spin around.

Your English wasn’t poor, and that doesn’t matter to me, what matters to me is your blind request for another persons source code as if that will ever happen. If I wanted it to happen I would not have obscured it in the first place and you don’t need the source to know the error because any Ruby programmer could replicate it simply from what I provided given the error is clear.

To put it bluntly: This source code is not open source.

How about fuck no?