Title photo
frugal technology, simple living and guerrilla large-appliance repair
Tue, 21 Nov 2017

My Blog Poster app works well in Ubuntu (ok, really Lubuntu) Linux

I recently updated a 15-year-old IBM Thinkpad R32 laptop (Pentium 4, 1 GB RAM, 20 GB hard drive) to Lubuntu 16.04, and I set it up to run my Blog Poster script written in Ruby.

Since this is a Linux environment, I like to use the Ruby version that the system offers in its repositories, also installing as many Ruby gems as I can from those same repos (instead of using gem install from the console).

The Blog Poster app, which attempts to make it easy to create social and regular blog posts from the command line, uploading them to the blog and sending them directly to Twitter, is fairly simple. It uses two gems: Nokogiri to help pull the titles of web pages and Twitter to (you guessed it) send a post to Twitter.

On Windows I used gem install to get both of those gems, and I could do the same in Lubuntu. But I'm very comfortable with Linux package management, so I opted to install ruby (which, believe it or not, isn't in the Ubuntu/Lubuntu default install) as well as ruby-nokogiri and ruby-twitter, all from the Ubuntu repository.

It worked.

Curiously, the script's call to vim did not work. There is, theoretically, no vim in the Ubuntu/Lubuntu default. But there is vi. You can install vim, but I opted to stick with the vi default, and I modified the system call in my Ruby code to call vi instead of vim.

Also, copy-pasting into the terminal (LXTerminal is what I am using) via right-click works great (though ctrl-v does not work).

The Ruby script works great, and I did a few successful updates to my blog and Twitter feed with this very aged laptop.