Many people experienced issues with memory usage when switching their Rails app from Ruby 2.0 to Ruby 2.1 on Heroku. For example, see Memory usage increase with Ruby 2.1 ver
We tried Ruby 2.2.2 on Heroku's Cedar-14 stack, 2X dynos, even reducing Unicorn workers from 5 to 3, and still had memory hover near the 1GB maximum within a few hours of moderate web traffic, and swap size jumped to 200MB - 300MB.
I gave Ruby 2.2 a try with Rails 4.2 and the same memory problems that plagued Ruby 2.1 also occurred. I am switching back to Ruby 2.0. Rails 5 will require Ruby 2.2 and higher so I hope someone will find a way to fix this.
Ruby 2.2-2.3 introduced another bug for multithreaded C-based ruby installations https://evilmartians.com/chronicles/ruby-2_2-oom,
basically, if stars align badly the GC turns off :P and with some sites stars align badly couple times a day, we still use Ruby 2.0 and are waiting for 2.3.5 for the fix from the blog to come out