Posts tagged rails


uninitialized constant Delayed::Job

delayedjob rails ruby workers | comments

Just a quick shout out for those having a problem with the latest DelayedJob, this is a quick fix!


Rails3: ActiveModel Lint

rspec rails3 activemodel lint | comments

If you're building ActiveModel-like classes, it's quite useful that you run the ActiveModel Lint tests that's shipped with Rails 3. Unfortunately, if you're using Rspec 2.0, using the Test::Unit version doesn't fly as well.

Continue reading »


Rails3: Factory girl and file uploads

rails3 ruby edge ruby19 factory_girl | comments

Our experience so far with rails 3 has been pretty good. Some of the modules and internals of rails were renamed, but so far we haven't experienced anything that changed drastically. Most of the stuff still have some parallelisms.

Continue reading »


Our first app in Rails 3

rails3 ruby edge ruby19 | comments

We're building a very simple app, and we decided to start with Rails3. Here is our stack so far:

  1. Rails3
  2. HAML
  3. Paperclip
  4. is_taggable
  5. twitter-auth
  6. mocha
  7. shoulda
  8. factory_girl
Continue reading »


Including Staging in Asset Packaging

assetpackager rails environments | comments

If ever you want to include staging when using asset packager, just write this initializer

Continue reading »


AutoMigrations and Merge Conflicts

auto_migrations rails migrations git merge conflicts | comments

If you're using the auto_migrations plugin to collaborate on a project, you may have stumbled on the problem of having a conflict on the version part of your schema.rb.

*shameless plug*

I created a fork of it that basically prevents this problem / nuisance from happening.

Continue reading »


Thoughts about Notifiers in Rails

rails notifiers conventions naming | comments

Most of the example or open source code built for rails I see usually use the class name Notifier for their mailer. I was peer-pressured into doing so also, but lately I've been thinking about this convention and stumbled on a possibly better naming.

Continue reading »


Cucumber + Autospec Won't Stop Running!

cucumber autospec sunspot solr rails bdd testing | comments

If you've ever had the setup of using cucumber, autospec, and sunspot SOLR in one your rails applications, chances are you've tried hitting your SOLR test instance just to verify that the whole stack works.

Continue reading »


Loving Heroku

heroku hosting rails deployment | comments

The best thing since sliced bread? (Or maybe sliced host)...

Heroku lets you create a free account and handles everything, from git hosting to mysql data storage, etc.

Git push means cap deploy

Continue reading »


Serving Secure Assets with Rails and Nginx

nginx rails secure assets sendfile | comments

Scenario: Grant access to some assets only to premium users

How do we go about doing this in an efficient way?

Prevent direct access to your assets

If you're using NginX, the following configuration would handle this part:

Continue reading »


Latest and Greatest?

queues background rails ruby redis | comments

I have been very interested and locked to background processing ever since I've employed it. I have tried Starling, Delayed::Job, beanstalk, ActiveMessaging, ZeroMQ, and RabbitMQ. Here's a quick rundown:

Continue reading »


The Art of Mixing in

ruby mixins modules rails models | comments

The Giant Central Model

I've been working for over a year at, which basically is a social network for doctors that aids people in potentially finding the right doctor for their needs.

Continue reading »


IE7 XmlHttpRequest parseerror problem

browsers ajax debugging ruby rails metal | comments

Hair Pulling Galore

Have you ever run into the problem in Rails Metal where AJAX Requests just choke? When you try and debug the error response, it would stupidly reply "parseerror".

Continue reading »


Rails 2.3.2 Object not Missing Constant Xxx

rails ruby debugging namespace routes | comments

I ran into this error earlier, and I got to tell you, this is really one puzzling error message.

Basically I have the code in my routes that does this:

Continue reading »


Waiting for Shoulda to work with Rails 2.3

rails23 ruby19 shoulda | comments

Since Rails 2.3 is the only Ruby 1.9 compatible version of rails, and shoulda hasn't yet made the move to support Rails 2.3, I'm gonna play a little waiting game and try and let the guys at thoughtbot update shoulda.

Continue reading »


Switching to Kestrel (from Starling)

starling ruby rails ruby19 kestrel queuing | comments

Since I'm slowly (but surely) making the move to ruby 1.9 each day, I discovered that starling doesn't work with ruby 1.9, and most probably, it never will.

The guys at twitter have moved to kestrel for a time now, so I guess that's the best move for me as well. Considering switching to an entirely different queue server with a different protocol will incur too much overhead as of this moment.

Continue reading »