Monthly Archives: August 2010

rspec2 using watchr instead of autotest

I was having troubles with autotest, and not really finding a good solution. But i noticed that inside rspec2 they were using watchr. Watchr is a very generic gem that will allow you to watch a set of files and take action when something changes. That sounds great, but maybe a bit too general :) […]

authlogic on rails3

If you want to get authlogic working in a fresh rails 3 project, it will take a bit more steps than devise. This has everything to do with vision: authlogic only claims to deliver you the backend, allowing itself to remain more stable and to easily replace other authentication libraries (even your home-brewn). That seems […]

etsy fast_tagger v2

There used to be a greasemonkey script fast_tagger which allowed an etsy seller to add all tags at once when creating or editing an item. Since april of this year this script was broken. My girlfriend has had a shop for a couple of years and missed the functionality from etsyhacks dearly. Apparently Ian, the […]

fixing pgadmin3

When i try to run pgadmin3 on my ubuntu 10.04 box i now get the following error: I assume it has something to do with one of the latest updates. I run all the updates always when they are proposed, but i am not really sure this always is a good idea. When googling the […]

setting up delayed_job in rails3

If you want to run longrunning jobs in the background, one very easy solution is using delayed_job. One other very interesting alternative is resque, but it seemed harder to setup (it uses redis), and delayed_job seemed to be just right for my needs. In short (from the redis documentation) : Choose Resque if: You need […]

rspec2 and rails3: controller testing with devise

Devise seems to become the new authentication standard in rails land. Also the last version of the gem is for rails3, so it is very easy to start using it. If you are using rspec2 for your tests, it is also really easy to test your controllers that are authenticated by devise. Suppose you have […]

handling ajax callbacks in rails3 using jquery

Previously, in rails 2.3.8 i used the prototype-helpers link_to_remote and form_remote_for (amongst others). These had the option to add callbacks as follows: (an example from the documentation). This example would, upon success update the html-element with class “cart”, and upon failure the class “error”. The possible callbacks were: :loading: Called when the remote document is […]

rails 3 and haml and unobtrusive javascript

I have created a Rails3 application, started with Haml/Sass and finding it awesome. I am also trying to do unobtrusive javascript. Before, in Rails 2.3, I would have expected a remote-form to have an :update attribute, where you could specify a selector where the response of the remote method would be rendered. Now it needs […]

starting a new rails3 site using rspec2 and jquery

With Rails3 i can create a project fully cut to my needs. I will write it down here, just so i remember it well and hopefully it will help some of you too. In my projects, i want to use haml, rspec2, factory-girl, jquery, … We need a few steps to complete this. Create the […]

awesome rspec hints and tips

Read “Pure Rspec”, a great slideshow by Jon “Lark” Larkowski. It contains some really cool rspec tips and hints, how to write your tests more readable and compact.