Live data from Hacker News

Better Rails errors

github.com

41–50 of 50 posts

Re: Better Rails errors

#41

You guys would be amazed if you tried frameworks like Symfony (instead of discarding PHP for not being beautiful or whatever). It has always had these features, and in Symfony2 it only got more awesome. You even have a complete analysis for each request, that you can open with one click: https://s3.amazonaws.com/i.imm.io/OvjX.jpeg https://s3.amazonaws.com/i.imm.io/Ovk9.jpeg Edit: Being downvoted. Some people just don…

fyi rack-mini-profiler does timeline stuff https://github.com/SamSaffron/MiniProfiler/tree/master/Ruby

Re: Better Rails errors

#42
post #23
post #17

Earlier quoted context omitted.

Your workflow may be good, I don't mean to judge that. But is not the rails way to be in the shell, rails console and editor at all times? Instead of trying things out in the browser you have automated testing doing that for you?

Why would you ever want to make a web app without constantly testing it in a browser?

Because constantly refreshing the page just to check a variable assignment that could be checked by an automated test is a ridiculous waste of time.

Re: Better Rails errors

#43
post #36

Earlier quoted context omitted.

go to the root project in the shell, stop rails server if it's running and type: bundle install then start the server again: rails server

If he is running under Pow, there's no reason to be running 'script/server' or 'rails server'. That's what Pow does for you. As with nearly all Rack application servers I know of, you can simply restart the application by creating/updating 'tmp/restart.txt' from your Rails root. Unix's `touch` command does this nicely. With Pow specifically, you can also create '~/.pow/restart.txt' (or '~/Library/Application Support/…

If you just want to restart a single pow app - in the directory of the rails app run `touch tmp/restart`.

Re: Better Rails errors

#45

Earlier quoted context omitted.

A bit late now, but 4.1 could get a campaign for this.

It is not too late to get things into Rails 4. We haven't released a beta yet. One of the things Rails 4 already features is better error pages, though no REPL.

I stand corrected.

Re: Better Rails errors

#46

You guys would be amazed if you tried frameworks like Symfony (instead of discarding PHP for not being beautiful or whatever). It has always had these features, and in Symfony2 it only got more awesome. You even have a complete analysis for each request, that you can open with one click: https://s3.amazonaws.com/i.imm.io/OvjX.jpeg https://s3.amazonaws.com/i.imm.io/Ovk9.jpeg Edit: Being downvoted. Some people just don…

The downvotes are overzealous in this case. A comment like this offers useful additional info/context about other languages that offer comparable capability, since many developers keep more than one type of screwdriver in their toolbox (or at least like to stay abreast of how their screwdriver du jour compares with other tools).

Re: Better Rails errors

#47
Looks fantastic! Keen to try Ruby/Rails soon, and coming from C#/VS land I often find that certain tools are missing in my process, this looks like a great (and in some ways, better) interface to debugging these kind of errors.

Re: Better Rails errors

#48

Earlier quoted context omitted.

A bit late now, but 4.1 could get a campaign for this.

It is not too late to get things into Rails 4. We haven't released a beta yet. One of the things Rails 4 already features is better error pages, though no REPL.

REPL requires [binding_of_caller](https://github.com/banister/binding_of_caller) anyway, which i doubt rails would include any time soon ;)

Re: Better Rails errors

#49

Earlier quoted context omitted.

It is not too late to get things into Rails 4. We haven't released a beta yet. One of the things Rails 4 already features is better error pages, though no REPL.

REPL requires [binding_of_caller]( https://github.com/banister/binding_of_caller ) anyway, which i doubt rails would include any time soon ;)

That's fair. :)

Re: Better Rails errors

#50

I love this! To get it to work with my mixed Padrino/Sinatra rack app I had to do this in each app: if PADRINO_ENV == "development" set :raise_errors, true set :show_exceptions, false end and use BetterErrors::Middleware if PADRINO_ENV == "development" in my "config.ru". I'm not deeply familiar with Padrino or Sinatra and so it took a lot of experimentation (and source reading) to find the right incantation. But it's…

another approach, which doesn't require modification of the rackup file:

https://github.com/padrino/padrino-recipes/blob/master/plugi...

Post reply on HN