Duplicate key violates unique constraint

A few days ago I got this weird error with one of my PostgreSQL databases: duplicate key violates unique constraint.Turns out the DB (or Rails) was trying to write the ids at least 2000 numbers lower than the highest number there, so Rails couldn’t save to it. While…

The word impossible

One of my least favorite words is “impossible”: it simply has no real value and just goes against everything I believe in, those same things that keep me alive and push me out of bed in the morning: discovery of extra-terrestrial life, vacations in space, and the like. Yes, I…

Get Rails 3.1beta1 on Heroku

It’s pretty simple, you only have a couple of things to change. First, in config / environments / production.rb change config.serve_static_assets = false to config.serve_static_assets = trueSecond, in your Gemfile, add gem 'therubyracer-heroku', '0.8.1.pre3' gem 'pg'Now you can do bundle install, commit to…

How to find ideas

Did you ever get hit with what was to become THE idea of the century, or so you thought? How do you weed out the “good” ones from the bad ones? Sometime last month I had such an idea and thought “Why isn’t it out there yet? The founder…

Coding projects

It’s been a while since I posted about my projects, even though I promised to have at least one project per month! However, I’ve been stumped with school work and finding freelance work so my last project doesn’t even count as an “incomplete” since I barely started…

Ruby and the power of gems

Lately I have been using more and more gems for my diverse Rails projects and gigs (shameless plug: if you are looking for a Rails guy, I’m your guy!), from authlogic to the youtube-g wrapper without forgetting devise or paperclip in the middle just to name a few! I’…

On learning stuff

How do we learn stuff? Some of us do so by reading a book, then re-reading till it somehow gets in their brain while others learn by practicing as they go. I am part of the latter group, I taught myself PHP and, more recently, Ruby/Rails using this technique.…

Release the kraken!

Well, not really much of kraken but more of a source code release. I decided to put podil on github, because viva la open source right? Sure the code is dirty, and noobish, and nasty, etc. But doesn't matter. I, hopefully, have learned much since then! Anyways, enough talking. Here…