My little Ruby Gem (Pi Piper) has been featured in a video, courtesy of Josh Adams!

 

The original article can be found here.

 

Thanks Josh!

Published on 03/29/2013 at 02:19PM . Tags ,

0 comments

This topic has been discussed numerous places throughout the Internet, but I always find myself having to re-google this every time I need it. For my own reference, the steps to backup an SD card on OS X are:

  1. Insert the SD card into your Mac (seems obvious)
  2. From terminal, run `df -h` and make note of your SD card. My shows up as "/dev/disk2s1"
  3. Launch Disk Utility, and "unmount" that partion. (Note: do not eject it).
  4. From terminal, run dd to backup. If the partion noted in df was "disk2s1" we'll be backing up "disk2". For example: "sudo dd if=/dev/disk2s1 of=my-backup.img bs=1m"

That is it for backing up. To restore an SD card from backup:

  1. Insert the target SD card into your Mac (again, obvious, right?)
  2. From terminal we'll run `df -h` again to verify the correct device. Though unlikey to have changed from the restore step, it's always good to double check this. A mistake here will result in you toasting something.
  3. From Disk Utility "unmount" the partion noted in step 2. (again, do not eject it)
  4. From terminal we'll run dd to restore our SD card from backup. If the partiion noted in step 2 was "disk2s1" we'll be restoring to "disk2". For example: 

When storing a backup image long term (e.g., for anything longer than simply backing up to immedately restore to a new SD card), I compress my backup files.

To compress, simply:

  • gzip -9 my-backup.img

To decompress:

  • gzip -d my-backup.img.gz

That should be it, have fun!

Published on 02/27/2013 at 02:34AM . Tags

8 comments

With Ruby 2.0 having just been released, I figured I'd give it a try on my Raspberry Pi (Raspbian OS). Other than, obviously, taking a while to compile the steps were pretty similar to those I've used before on OS X.

 

Firstly, if you don't already have RVM installed, installed RVM.

 

One odd thing I noticed about installing RVM on the Pi was that it automatically started compiling Ruby 2.0. I don't remember RVM automatically compiling any previous version of Ruby, but in either regard it's for not. Allowing it to complete the compilation will result in a somewhat functional Ruby, but the moment you run "gem install" you'll be greated with the following error:

 

	ERROR: Loading command: install (LoadError)
	    cannot load such file -- openssl

 

The solution for this is to allow RVM to install an openssl package, and then to re-compile Ruby.

	rvm get head
	rvm pkg install openssl
	rvm reinstall all --force
Other than some warnings about missing debian packages (which I assume is the result of Raspbian not having a port of various debian packages RVM is expecting), this will result in a correctly compiled version of Ruby 2.0 on Raspbian OS for your Raspberry Pi.

Published on 02/26/2013 at 05:08AM . Tags ,

1669 comments

Powered by Typo – Thème Frédéric de Villamil | Photo Glenn