Skip to content
Phil Hofmann edited this page Jun 11, 2014 · 7 revisions

Search

We are using Postgres native search. This uses the tgrm extension. When using Debian, make sure you have postgres-contrib installed and you should be good.

Specs

  • In config/settings.yml set gc_cycle to make full use of your RAM (garbage collection shoud be disabled as long as possible).
  • Use sqlite3 as your database (instead of Postgres). For specs it's about 40% faster. (But will break into Search related specs.)

Rspec tags and slow specs

We are using rspec tags to filter for specific specs

Examples

  • Run all specs except for chromedriver: zeus rspec --tag ~driver:chrome spec
  • Run specs with chromedriver: zeus rspec --tag @driver:chrome spec

By default do not run slow specs locally, unless explicitly requested by:

zeus rspec --tag @slow:true spec

Exceptions

We are using dynamic exceptions, as shown by Ryan Bates.

http://railscasts.com/episodes/53-handling-exceptions-revised?view=asciicast

If we need to have static exception pages(for example to be shown by Nginx), we can easily generate them like this:

curl localhost:3000/errors/404 > public/404.html
Clone this wiki locally