Manuel van Rijn

Bit blog

Disable Rails callback

Today I’ve had some difficulties with a Rails migration, that took ages to complete. After some debugging I figured out that the issues was because of the before_save and after_save callbacks.

Of course we could remove the before and after save callbacks to speed up the process, but I don’t like the idea of releasing a model that misses these behavior. I mean they’re not there for no reason right?

Shrinking your Git repository

In the past weeks I’ve looked into a problem that kept us from releasing to Heroku, because the git repository was to large. In time the repository has grown to approximate 180 Mb.

In the past we’ve made some decisions that we probably wouldn’t take again. We for example, we decided to store the gem files in the vendor folder and having the rails code included in our repository. Our goal then was, that releasing the project with Capistrano would be easier and faster, because it didn’t have to download all the gem’s.

Anyway at this point we don’t have the gem’s stored anymore in the vendor folder. Since tools like RVM and rbenv we store these within the ruby/rails version of that specific project.

Still we have the problem that the repository contains files etc. we want to remove to shrink the size of it.

Intro: Start blogging like a hacker(?)

I’ve just decided to switch from Wordpress to Octopress because I wanted something new and not something over-featured

All the plugins and choice’s I had to made, and the maintenance of all these, just kept me from doing what I supposed to do with it, blogging.

So after some googling what a good alternative would be for Wordpress I found Octopress A blogging framework for hackers. Alright +1 for the title

So basically Octopress generates (bakes) HTML content from the Markdown content you write. I like this simplicity and I love the syntax.

Octopress give’s you the functionality to host it on your own server, but also to host it on Heroku or Github. Beside the Git approach (push your source and deploy the generated code to the master branch) you can use RSync to sync files to your server. I use Github to store my source and generated html.

Enough talking about Octopress for now. I’ll hope to post my next post soon.