In previous version of Rails, it was suggested that individual tests could be run like this:
ruby -Itest test unit/test/category_test.rb
Since Rails 3, I’ve been unsuccessful at actually being able to run tests that way. Specifically, the environment dumps out a few errors messages and fails to execute the tests.
I’ve been working on a Rails application in which I’m using Devise for the user account and authentication management library.
Out-of-the-box, Devise will throw up a browser dialog for authentication if the user fails properly login. For this particular project, I wanted to get rid of the dialog and exclusively use pages.
There were a number of small changes that I had to make to get this to work. Google wasn’t the biggest help, so here’s what I had to do in my specific case:
One of the sites that I manage was sucking an inordinate amount of bandwidth over the past week or so.
The raw access logs showed that an image that I was hosting was being referenced on a number of different sites. Preventing this from happening is an easy fix:
If you’re doing local Rails development and are attempting to setup a database using MySQL (specifically, MySQL2) and you keep getting:
uninitialized constant Mysql2
Here’s what I did to fix the problem:
I’ve recently begun working on a PHP-based project and wanted to introduce unit testing into the mix to cover some of the core code.
On my local development environment, I’m running an WAMP stack (specifically with XAMPP) and was looking for a solid unit test framework for PHP. Continue reading