@Samasource is up for a $1 million grant at the American Giving Awards! Winners are selected by popular vote on FB this week only. If you believe that work is the answer for ending poverty, I would truly appreciate if you could take a moment to vote for us on FB via this link. You can vote until Dec. 4th at http://lnkd.in/qS7HJQ
Learn more about our mission at http://lnkd.in/3QMeHp
Day 2 of the Chase Giving Awards Voting: @Samasource is up for a $1 million grant at the American Giving Awards! Winners are selected by popular vote on FB this week only. If you believe that work is the answer for ending poverty, I would truly appreciate if you could take a moment to vote for us on FB via this link. You can vote up to once a day until Dec. 4th.http://lnkd.in/qS7HJQ Learn more about our mission at http://lnkd.in/3QMeHp
There are a lot of different ideas about how to run arbitrary tests in Rails (including autotest), but I’ve settled into using a Bash script. This script accepts either path arguments or regular expressions to specify which tests to run. It doesn’t “prepare” your test database, so if that is needed you should run rake db:test:prepare first.
Some added features:
- starts up a Memcache server before the test suite is run, and shuts it down afterward
- it sets up some environment variables for better performance when running in REE
And here’s the script:
help in this effort I wrote a couple of quick login and logout scripts
to track their time on our home computers. These scripts write their
information to a Mongo database running in http://mongohq.com and to
the Mac OS/X syslog. I also have a web application that will read this data and display how
long each child has been on the computer for a given time period, and
what the events are for that time period. So far, it’s working out nicely. There was no real need to use Mongo for this, I could have used a
traditional RDBMS (e.g. MySQL, PostgreSQL, etc.), but Mongo was pretty
easy to do and I just like using it.
I’ve switched to Terminator on Linux from Gnome Terminal. Mo’
features, mo’ shortcuts, mo’ better!
I have a Sinatra app that wouldn’t show the exception backtrace in the log when an error occured. Obviously, it’s a bad idea to log backtraces, but in development/pre-production it can be really handy. It turns out that in my modular app, I needed to disable :show_exceptions. Once that was disabled I wouldn’t see the error page in my browser, but the side effect is that I get the backtrace available to me in my log. I didn’t expect such a side effect.
My actual code is something like this:
Here’s a sample application that shows the behavior a bit better:
If you remove “, :show_exceptions” from line 9 of app.rb you won’t get the backtrace in the log that is being logged at line 18 in the “error” block.