Case Study: Excel Reading / Writing Library Performance Comparison

We're doing a lot of writing to Excel files in our latest ERP project. In the beginning, we use RubyXL to read and write Excel files. However, we found out that often the server crashed and restarted when it is writing Excel file. Turns out, the problem is with the…

Ruby on Rails: Allow Import CSV File with Double Quote (") Character

In one of the project that we're working on, we allow the application to import a CSV file that is using tab character to separate the columns. We can read a CSV file using the CSV class or Ruby gem like Roo gem. But there is a problem when we…

Ruby on Rails: Overriding `rake db:schema:load`

In one of the project that we're working on, we change the ID of all documents to start from 1000001. To do this, we need to execute SQL statement directly using the execute method of ActiveRecord. execute "ALTER TABLE documents AUTO_INCREMENT = 1000001 Problem with adding this only in migration…

Ruby on Rails: Switching MySQL Database Based On Current Git Branch

At Dexcode, we uses Git heavily and follow the Git flow process described here: http://nvie.com/posts/a-successful-git-branching-model/. Often times, we work on a separate branch which modifies the existing databases or sometimes the master and develop branch is so far apart that we wish that the database switch…

Ruby Framework VS Native Ruby

Are you use a Ruby framework to build a website? Or just with native Ruby code? If you are using a Ruby framework to build a website, what is the framework you are used? Why you are choose that framework to develop a website? What about the other frameworks? Have…

Track Session Id Change on Devise

Devise change session id? The same question poped up when earlier on our project we need to keep track of what session id being used. Yes, Devise change session id, sometimes. It happen after authenticate user and after logging out user. On after authenticate user, only session id that being…