Stream of Ry

Yet Another Geek In The World

Archive for the ‘Software’ Category

Installing Ruby on Rails on Lighttpd, Ubuntu

leave a comment

Today, I started out on the very grueling task of running a RoR app on top of Lighttpd. The added complexity I introduced was that the sqlite db I’m using is hosted over Dropbox. This turned out to be a not-so-good idea and I resorted to rsync-ing the dbs in Dropbox to another location accessible by the web server.

I’ll update this post at a later date but for now, this guide would immensely help you out. I’ll provide a step-by-step guide later on.

Written by rystraum

September 21st, 2011 at 11:31 pm

Posted in Software

Tagged with ,

Ruby : `generate_accept_header’: Invalid preference factor: 3.0 (ArgumentError)

leave a comment

So, I’m trying to run Tracks and I’m at running the server stage now. Running script/server -e production only gives me this:
Read the rest of this entry »

Written by rystraum

September 14th, 2011 at 4:05 pm

Posted in Software

Tagged with ,

Ruby on Rails: no such file to load openssl

leave a comment

After installing rails on a new computer and running across the same problem I had before (boy, am I glad I blog my fixes!), I tried running rails server which gave me:
no such file to load openssl
when I visit localhost:3000

I compiled ruby from source and am on Ubuntu, so if you’re in the same boat, here’s how to fix it:

sudo apt-get install libssl-dev
cd /path/to/ruby/source/ext/openssl/
ruby ./extconf.rb
make
sudo make install

After that, the page should load fine.

Written by rystraum

September 14th, 2011 at 2:01 pm

Posted in Software

Tagged with ,

Concatenating images with montage

leave a comment

To concatenate multiple images vertically:
montage image1.png image2.png -mode Concatenate -tile 1x output.png

To concatenate them horizontally, just change the -tile 1x to -tile x1

You can check more use cases here or RTFM here. :)

Written by rystraum

August 19th, 2011 at 2:52 pm

Posted in Software

Tagged with , ,

Mounting remote directories via sshfs

leave a comment

I’ve had the (dis)pleasure of having to actually code on a Mac. The shortcut keys are too much of an interruption to code comfortably. OTOH, I need the Mac to compile via XCode.

Necessity is the mother of innovation, they say, so I searched around and stumbled upon SSHFS.

Installation was straightforward. On my Ubuntu 10.10:
sudo apt-get install sshfs

Adding myself to the fuse group:
sudo adduser me fuse

And then mount via CLI as follows:
sshfs me@remoteip:/Users/developer/Desktop ~/local/mountpoint

It’s now looks like any other directory you have in your system, albeit with a bit of minor lag. Then I code using my two monitors, and with all the Linux goodness I want. I’ve set up a blank key pair on my local and the remote machine so it doesn’t ask me for passwords anymore.

Laziness is truly such a virtue.

If you encounter other problems, this was the article I followed the first time around.

Written by rystraum

July 6th, 2011 at 11:10 am

Posted in Software

Tagged with , ,