Who Needs Actions

Ruby on Rails, Javascript and Friends.

Mac Hanging at Grey Screen After Deleting Lib Files

Is your Mac failing to boot past the grey screen, thanks to deleting some important system files? The example below is specific, but the general method to resolve should be the same in many cases: boot into single user mode and re-install the missing program.

Having switched to a Mac after years of being solely a Windows user (and you think you had a tough time growing up?!), every day is very much a learning curve. Today was no different, while trying to get libxml2 working nicely with the Nokogiri rubygem, I installed a newer version of the toolkit to a different location. My Mac stubbornly insisted on using the current 2.6.16 version so I bravely strolled into terminal and ran: sudo rm /usr/lib/libxml*.

Capistrano Ignoring Ssh Public Key

An issue that had me stumbled a while back and one of which I was reminded of this morning: the initially frustrating issue of capistrano repeatedly asking for my server ssh password. Now connecting to the deployment server via keyless ssh works without fail, the deploy config file seems fine and you can connect to your source code server via keyless ssh – so what gives?

A key aspect to remember is that the purpose of capistrano is to run commands on your remote deployment server as if you were running them locally on the server itself. So when we reach the task of grabbing the code from your chosen code repository (cloning from git for example), the command is being called from the deployment server and so it’s this connection that requires the ssh connection set up is order to avoid passwords.

The solution here is to set up the ssh key between your deployment server and your source code repository server to authorise the connection, and this is done in the usual way: running ssh-keygen on the deployment server, then copying the generated .ssh/id_rsa.pub into a new line of your source code servers .ssh/authorized_keys2 file. The details here may vary depending on your setup.

Done, no more pestering – capistrano is supposed to improve productivity after all right?

Thinking Sphinx on Rails Setup Issues

Sphinx is a full-text search server, able to index data from sources such as a database and make up for what traditional databases like MySQL lack. With use of the Thinking Sphinx gem, setup and usage with Ruby on Rails is real easy – yet there is a hurdle or two I stumbled upon:

jQuery Ajax With Rails Respond_to format.js

This year has been quite a shift for me in every aspect of my life – especially with regard to web development and this blog will now reflect that. For most part, my full time job and side projects use Ruby on Rails and related technologies such as jQuery, mysql, memcache, redis and other web development aspects such as xhtml, css, usability and design. Future posts will announce projects of my own, document my discoveries and occasionally broadcast my opinions on all that is Web Development. Follow me. Let’s jump straight in: