Ruby, Rails & RVM woes

I’ve had several issues over the past day pertaining to Ruby, Rails and RVM and all of them were caused by one silly thing. Problem 1: You can’t swap between Ruby versions using RVM If you can’t swap between Ruby versions that you know you’ve installed then you’ve probably installed something using “sudo”. It is highly recommended that you install & use RVM in the single user mode as this is easiest. If you do this then all the versions of Ruby etc. that you install will be installed in your home directory (usually ~/.rvm/) instead of system wide and this negates a whole bunch of complexities. Running this command will tell you which ruby executable you’re using: [code language=”bash”] which ruby [/code] If the executable is not sitting in your home directory e.g. it’s in /usr/local/bin then you’re in a spot of bother. The easiest way I’ve found to …

Read more

DML currently not allowed

This almost belongs in my sarcastically titled, “Meaningful Error Messages ..” series, but as it has traceable causes, I thought I’d write something up on its most frequent causesĀ (I meant to write this up a few months ago, but it slipped my mind (find it in your heart to forgive an ol’ developer) and now I think it’s time the world knew).

‘DML currently not allowed’, what could that mean? Well it means that DML isn’t allowed. And that it’s not allowed right now, but with the slight promise that given time, it will be allowed. Often in the past, hoping against hope, I kept on pressing that button/link/onclick-area, but the cloud never changed its mind. With a sigh I constructed the Google search query and began trundling through the results.

Read more