- Powered by
- WordPress
-
Unix command of the day: watch
The project I’m working on right now involve not just Dockerized Rails microservices, Meteor JS, and a data set measured in tens of terabytes, but also a big Bash code base. Bash is a language that makes it easy to shoot yourself in the foot. I have some thoughts on how to write robust, modular,…
-
libdb2.so.1: cannot open shared object file
I got this error starting a ruby application: /usr/local/rvm/gems/ruby-1.9.3-p547/gems/bundler-1.7.3/lib/bundler/runtime.rb:76:in `require’: libdb2.so.1: cannot open shared object file: No such file or directory – /usr/local/rvm/gems/ruby-1.9.3-p547/extensions/x86_64-linux/1.9.1/ibm_db-2.5.11/ibm_db.so (LoadError) An .so is a Linux library, equivalent to a .dll on Windows or a .dylib on Mac. Note that there are two different libraries mentioned. ibm_db.so is present, while libdb2.so.1 is…
-
How to run and install IPMIView on Mac
Edit: The download link doesn’t work anymore, but it looks like IPMIView is now available in the Mac App Store. Also, just in case, someone suggested running the Linux version on Mac. Softlayer cloud uses IPMIView for direct console access to bare metal hardware. SuperMicro makes a Mac version of IPMIView available for download. Bizarrely,…
-
Persistent SSH sessions with screen
Do you ever need to kick off a long-running command while SSHed to a server, but be able to disconnect and reconnect at will? You can do this with screen. Before doing anything, start a screen session: screen When you’re ready to put your work on hold, detach the screen: screen -d If you have…
-
How to rename a file in a File upload dialog on Mac
Windows users will scoff at this, but renaming a file in a File Upload dialog box on Mac is a surprisingly obscure action. Renaming is not available in the context menu, nor does the usual shortcut work. To rename a file in a regular Finder window, you can select it and hit the Enter key.…
-
Windows to Mac: Keyboard shortcuts
In December, I got a Macbook Air that I’m now using as a primary development machine. Before that, I was developing on a Windows 7 machine with heavy reliance on Git bash and Cygwin, and using Linux on the server. I’ve used Linux as a primary desktop at times, but found both dual-boot and VMs…
-
libdb2.so.1: cannot open shared object file: No such file or directory – … ibm_db.so
Got this error while deploying a Rails app on Nginx: libdb2.so.1: cannot open shared object file: No such file or directory – … ibm_db.so This means that the ibm_db adapter is installed, but it can’t find the DB2 libraries. The issue is that IBM_DB_HOME and some other environment variables are not set. The best solution…
-
Linux command of the day: banner
banner can be a useful command for setting login and welcome messages (e.g via /etc/profile). $ banner PRODUCTION ###### ###### ####### ###### # # ##### ####### ### ####### # # # # # # # # # # # # # # # # # # ## # # # # # # # #…
-
JRuby for the Java .class is .java_class
I’ve been having a lot of fun working with a Apache jclouds in JRuby. All the examples for the API are in Java and Clojure, while online JRuby docs could be better, so there’ve been some interesting translation challenges. I just had to re-Google what .class becomes in JRuby, so a quick note for the…
-
Exploring Ruby and Python interactively
Both Ruby and Python offer great interactive shells, also known as REPLs (Read Eval Print Loops). These are handy for verifying snippets of code. You can invoke Python’s by simply running python or Ruby’s by running irb, jirb (for jRuby), or rails c (for Rails). Sometimes, however, one can be mystified as to what one…