Ruby `send` vs `call` method

To begin with, send and call are two very different methods. In ruby, the concept of object orientation takes its roots from Smalltalk. Basically, when you call a method, you are sending that object a message. So, it makes sense that when you want to dynamically call a method on an object, the method you call is send. This method has existed in … Read more

PG::ConnectionBad – could not connect to server: Connection refused

It could be as simple as a stale PID file. It could be failing silently because your computer didn’t complete the shutdown process completely which means postgres didn’t delete the PID (process id) file. The PID file is used by postgres to make sure only one instance of the server is running at a time. So when it goes to … Read more

How to uninstall ruby installed by ruby-install

Unfortunately appears that ruby-install just downloads and compiles Ruby, with no option to remove it, unlike RVM or rbenv. So, probably you’ll need to run some manual commands here to delete all installed files. 1. Locate it Usually ruby-install will install rubies in ~/.rubies/ folder. If you’re not sure which ruby was installed using ruby-install, locate the file .installed.list, as it has a list of installed … Read more