Live data from Hacker News

Better Rails errors

github.com

31–40 of 50 posts

Re: Better Rails errors

#31

I'm a complete rails newbie. I've added 'better_errors' into my Gemfile, started my server/also with Pow and yet I see the same errors as before?

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

Re: Better Rails errors

#32
I've started building this exact same thing so many times, but never had nearly the follow-through you did. Fantastic job. This has been sorely lacking for many years, and I'm excited to start using it!

Re: Better Rails errors

#34

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…

No offense, but there is no way in hell I would look at that page for hours on end coding, it looks like it was designed in 3 minutes.

Re: Better Rails errors

#35

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…

Guys, just because you do Rails doesn't mean you can't get to know other frameworks too.

I came to Rails from Symfony and there are definitely things I miss. Rails is way better overall, but there are loads of little things that were fantastically useful.

Re: Better Rails errors

#36

I'm a complete rails newbie. I've added 'better_errors' into my Gemfile, started my server/also with Pow and yet I see the same errors as before?

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/Pow/Hosts/restart.txt', since it's the same location) and that will force Pow to reload itself.

Re: Better Rails errors

#38
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/…

I didn't know abut 'restart.txt' that's awesome!

Also, I've tried that and I'm still getting the same old "Action Controller: Exception..." error. Specifically I have a MySQL error, yet no 'better_errors' showing.

I've already executed 'bundle install' too.

Re: Better Rails errors

#39
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 working great now!

Re: Better Rails errors

#40

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…

No offense, but there is no way in hell I would look at that page for hours on end coding, it looks like it was designed in 3 minutes.

Looks to me like a ton of time was put into the design. Don't think this kind of "it sucks but I am not going to explain why" comment really adds much.
Post reply on HN