“No route to host” error while trying to install RVM

In rare cases the gpg --keyserver can fail in the process of installing RVM on MacOS. Luckily, there is a command you can run to circumvent this problem. Try using this instead:

curl -sSL https://rvm.io/mpapis.asc | gpg --import -

You should see in the results something like this:

  gpg: Total amount processed: 1 
gpg: imported: 1

Which should mean that everything has worked as expected. Now try following all the remaining commands, starting with this:

\curl -sSL https://get.rvm.io | bash -s stable

How to Factory Restore an iPhone without the Passcode

Recently, I helped a client who owned an iPhone which they needed to restore to factory settings, however they had forgotten the passcode they had originally set the phone up with. Normally, to update an iPhone you are required to ‘authenticate yourself not he device so that the computer being used to do the update knows you own the device.

Under normal conditions this is completely fine; but in this situation it caused a big problem.

Luckily, if you don’t care about the contents of the phone, it is possible to reinstall iOS with out the passcode if you know the trick (be warned, the Phone will be completely erased, but if you cannot get into it and have no backup – you’ve basically lost the datas already, haven’t you?)

  1. Turn off the device by holding down the power button until the slide to turn of message appears and swipe.
  2. Connect your lightning cable to your PC but DO NOT PLUG IN THE PHONE.
  3. Hold the Phone’s “Home” button as you connect the usb cable into the device. This should cause the iPhone to start up automatically.
  4. Continue holding down the “Home” button until the “Connect to iTunes” symbol appears on the screen. When you see this, release the “Home” button.


    A message should appear on the computer from iTunes saying that it has detected an iPhone as a device in Recovery Mode.

  5. Click the “Restore” button and the device will be completely erased and iOS will be reinstalled onto the device.

And walla! One freshly Factory Restored iPhone without knowing the passcode.  This can be done on any computer with iTunes, it does not have to be the computer that normally manages the backups and syncs of the phone.

How to Install ‘therubyracer’ or ‘libv8’ gem(s) on OSX

Recently, I need to move some Rails projects I was working on to new computer and this needs me to install all the dependencies for these projects.  While using bundler to install the gems; I encountered the following error:

extconf failed, exit code 1
Gem files will remain installed in /Users/ash/.rvm/gems/ruby-2.2.1/gems/libv8-3.16.14.3 for inspection.
Results logged to /Users/ash/.rvm/gems/ruby-2.2.1/extensions/x86_64-darwin-14/2.2.0-static/libv8-3.16.14.3/gem_make.out

An error occurred while installing libv8 (3.16.14.3), and Bundler cannot continue.
Make sure that `gem install libv8 -v '3.16.14.3'` succeeds before bundling.

Fortunately, with homebrew fixing this (on OSX 10.11, El Capitan at least) worked perfectly. Simply execute these commands:

brew install v8
gem install therubyracer
gem install libv8 -v '3.16.14.3' -- --with-system-v8

Showing Hidden Files in OSX Finder

Just like when using Windows, sometimes it is necessary to make special hidden system files visible to Finder.  There is no preference for it, but with a simple Terminal command, things can be made visible very easily, on a privileged user account.

Simply open the ‘Terminal’ application, and at the prompt, type:

defaults write com.apple.finder AppleShowAllFiles TRUE

and then:

killall Finder

This will cause all Finder windows to close and then reopen with the hidden files, visible and identifiable with a ghost-like appearance. You should be able to interact with them normally now.

Screen Shot 2013-11-28 at 11.00.54 pm

Syncing Google Contacts with iMessage (and Contacts) on OSX Mavericks

You may remember earlier in the year I took issue with the super secret hidden checkbox in the Mountain Lion’s version of Contacts which magically syncs your Google contacts with OSX Contacts and Messages. As it seems, Apple have finally fixed the SSL problem stopping you from syncing through the Google option in System Preference’s Internet Accounts setup.

Getting the sync to work now is as trivial as adding a Google account to your Internet Accounts list, log in and turn on the items you want to sync. Screen Shot 2013-11-26 at 9.46.42 pmHurray! Easy peasy.

It’s beyond me that it wasn’t like this before.

 

Pipe Viewer (pv) in Mac OSX

 

Update:
Forget what I said.  Install Homebrew (really, do it now) and use HomeBrew to install it.


Pipe Viewer (pv) – is a terminal-based tool for monitoring the progress of data through a pipeline. It can be inserted into any normal pipeline between two processes to give a visual indication of how quickly data is passing through, how long it has taken, how near to completion it is, and an estimate of how long it will be until completion. However, it isn’t included by default in Mac OSX.

The good news is that there are several ports of pv, you just need to go and grab one:

  • HomeBrew: Run “brew install pv” to get the latest version.
  • MacPorts: Run “port install pv” to get the latest version.
  • Or (recommended) install the Rudix pv port (a simple package installer)

Pv allows you to get a really awesome progress of your terminal commands to see how things are going; especially useful for long operations (such as cp or tar etc) so you know everything is ticking over time (and perhaps even giving an ETA for completion):

13.2GiB 1:33:17 [3.57MiB/s] [================================>                ] 67% ETA 0:44:4

I highly recommend this for anyone doing long, large or complicated terminal commands.  It’s outstanding! To learn more about using Pipe Viewer, this is a great resource.

 

Syncing Google Contacts with iMessage (and Contacts) on OSX Mountain Lion

Being able to sync your Google Contacts with your OSX Contacts is possible – it just takes a bit of digging.

As a long-time iPhone 4 user, I was recently introduced to the wonderful OSX Messages app, which lets me read/send iMessages from my Mac, as if I had sent a text from my phone. Such an amazing thing (even if it does only work with other iPhone users). However, it only used phone numbers to identify contacts; less than ideal since I seldom reference my friends and family by their cell numbers.

I use Gmail for all my email purposes; and after loosing my completely contacts list TWICE from the failures of Windows Mobile 6, I am also a huge advocate for Google Contacts – awesome synergy between my phone list and email contacts. and while I’ve been very happy Syncing my email/calendar/contacts between Google and my iPhone; my Mac just didn’t want to come to the party and I refused to retype my contacts manually.

At first I tried syncing the contacts over Google’s Microsoft Exchange Protocol (which is actually the best way of syncing Gmail/contacts/etc onto the iPhone), however you cannot get the necessary SSL to connect to Google on Mountain Lion. Next I tried backing up my iPhone contacts into iCloud, which also failed.

I was about to give up until I discovered that the preferences for the Contacts app has an option that I didn’t know about. Carefully disguised under the “On My Mac” account, you will find the option to sync with Google.

syncing-google-contacts-in-mountain-lionHurray! Easy Peasy.

Left4Dead and Left4Dead 2 Available on OSX in October

Back in March, the Mac gaming world got excited when Valve announced their Steam gaming software was coming to the Mac — along with Left 4 Dead 2, Team Fortress 2, Counter-Strike, Portal, and the Half Life series.  I was shocked at just how quickly the Valve catalog was being ported to OSX, but then, the announcements stopped as suddenly as they started; alegedly sue to a number of graphics and OpenGL bugs issues that Valve helped Apple sort out.  Today, I found this little gem:

We’d previously heard tell that now that those graphic issues are fixed, Valve as hard at work to bring Left 4 Dead and Left 4 Dead 2 to OS X by October… and now, if a casual mention over at Macworld is anything to go by, it looks like that date might have been further locked down to October 5th, along with the latest Left 4 Dead and Left 4 Dead 2 add-on pack, “The Sacrifice.”

So only a few more sleeps until all Mac users can help keep the hordes of zombies at bay with their Windows buddies.

Only 11 More Sleeps…

Words cannot describe how much this excites me.  Only in my wildest dreams did I think Steam (my absolute favorite gaming platform) would ever come to Mac OSX.  Then I saw this news, which made me giddier than a school-girl.

I watched April come and go, and still no Steam for Mac.

But then my patience was rewarded when Valve gave a hard date of May 12, 2010 as the official release date.  Now obviously we Mac peeps wont get the entire Steam catalog, but Valve has more-or-less promised their library and any future games to be simultaneously released on PC, Mac and XBox360.

Valve also has a nasty habit of pushing back release dates again, and again – but I am hopeful that this time, they’ll do us proud.