Rails 3.2.19 with ruby 2.1.5

We have a rail 3.2.19 application running on ruby 1.9.3 and passenger 3.0.19. We upgraded ruby to 2.1.5 and passenger to 4.0.57 and ran into the following issues post deployment.

  1. Some of the update queires generated had 0=0 instead of actual query’s where clause

  2. Some of the select queries the realtion name in the where clause was missing.

Is rails 3.2 compatible with Ruby 2.1.5?

Short answer: yes. I’ve been running that pair for a while now on one of my apps.

Any idea what might be the causing those weird activerecord errors?

My only guess is that something inside a where() is getting garbled somehow. Are you using anything like Squeel or MetaWhere?

You might want to check the diff on your Gemfile.lock to see what gems have changed with the ruby change ( because some could have upgraded to work with 2.1 vs 1.9 ). My guess is the culprit is there.

This seems to be happening only sometimes not always. Can this be related to Passenger upgrade? Anything related to concurrency?

It may be the case that an intermediary result is failing and causing a
future where query to result in the 0=0 behavior. Ruby should have very
little to do with concurrency issues, if anything that would be in
passenger's wheelhouse. Did your configuration change at all with the
upgrade?

causes*

We failed to notice RailsAppSpawnerIdleTime that we had set to 0 in Passenger 3.0.19. Looks like it has now been replaced by PassengerMaxPreloaderIdleTime. So I guess it is now using the default value of 300s(5 min). Could this be causing the issue I described?