Archive for June, 2010

It documented that url() references in CSS served over HTTPS need to explicitly list the full URL in order to avoid the ‘nonsecure’ warning on IE7 & IE6, but I just ran into a variation on this that I found non-obvious:

I’m making use of http://fancybox.net/ to display contextually relevant tutorial videos. In jquery.fancybox-1.2.6.css, there was an embedded, blank image:

background-image: url("data:image/gif;base64,AAAA");

Because that URL is not explicitly “https://” it caused IE7 to throw the “this page contains both secure and nonsecure items” even though the data was embedded in the CSS file. Changing that url to the explicitly https url of an actual gif solved the problem.


Read Full Post »

If you are getting a message such as

rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.map

when you try to run Resque workers (for example by QUEUE=* rake environment resque:work), then here is the solution: http://github.com/defunkt/resque/issues/110

I’m simply posting here because Google did not turn up that Github issue in all my variations on the above search terms. I’m also including the actual solution, posted by Github user djanowski:

djanowski 2 days ago | link

The issue is that Redis changed this behavior: before, calling commands operating on non-existent keys would return nil. Now it returns the same result as a key containing an empty structure.
On the other hand, the Ruby client had a bug that was treating a nil response from Redis as an empty array. This was fixed in 2.0.1. So now the client correctly reflects Redis’ behavior.
Thus, your options are:

* Use redis-rb 2.0.0.
* Upgrade Redis to a more recent version (something later than antirez/redis@4e27f26).
* Patch Resque to handle this bug (less optimal in my view). Basically: redis.smembers(:workers) || [].

Read Full Post »