Entries categorized 'Apple'

Fixing Uninitialized Constant MysqlCompat::MysqlRes Error on Snow Leopard

Recently I ran into a problem on my MacBook Pro running Snow Leopard when trying to connect to a MySQL database.  The current version of the gem (2.8.1) installed fine but when trying to use it, I received the following error:

uninitialized constant MysqlCompat::MysqlRes

When trying to spin up a Rails application on my Mac.  I am running Snow Leopard and already had the MySQL gem installed.  A bit of searching around the web led to some information that this is an issue to do with the MySQL driver, in particular mysql-2.8.1.  The explanation came from a thread on StackOverflow.com:

As it turns out, that class should not exist; the error message is caused by a problem with the latest Mysql driver. mysql-2.8.1 looked for my libraries in a directory named with an extra level of 'mysql' at the end. For instance, my libraries (under MacOS X 10.5.8), are in /usr/local/mysql/lib, but the mysql.bundle library looks for the MySQL libraries at /usr/local/mysql/lib/mysql ... which is wrong.

I tried some of the suggestions in the thread which suggested a straight install of the MySQL 2.7 gem but the result was the same.  It seems things are treated a bit differently on OS X 10.5.x and 10.6.x because of the 64-bit goodness we now have, but I was able to resolve the issue.  The first step was to uninstall my current MySQL gem:

sudo gem uninstall mysql

The command is a bit long but we basically want to install the version 2.7 of the MySQL gem and tell it where the MySQL main directory is located as well as where the configuration is located.  This command should be entered in a single line from a Terminal prompt (broken up here for display purposes):

export ARCHFLAGS="-arch i386 -arch x86_64" ;sudo gem install --no-rdoc --no-ri 
-v=2.7 mysql -- --with-mysql-dir=/usr/local/mysql
--with-mysql-config=/usr/local/mysql/bin/mysql_config
Firing up the Rails application worked like a champ after the gem installed.  I would imagine there will be a fix for the MySQL gem 2.8.1 or maybe there is already a workaround I did not come across in my search.  MySQL is working Snow Leopard for my Rails applications, so I am happy.
 
Technorati Tags: ,,

The Solid-State Drive (SSD) Experience in a MacBook Pro

I recently purchased a late model 2009 Apple MacBook Pro which came with a 500G 5400 RPM drive.  After many years of using a laptop on a daily basis I quickly came to realize that one of the biggest factors in laptop performance was a slow hard drive.  I think Apple ships their laptops with 5400 rpm drives because the average user would never know the difference and it helps keep the heat down and the laptop quiet.

I upgraded my last MacBook Pro to a 7200 rpm drive not long after having it and noticed a great speed improvement but also a pretty significant amount of heat being transferred through the aluminum body when the drive was working over time.  I wanted to avoid that this time.

I decided to pursue a Solid-State Drive (SSD) as they are really fast compared to a traditional hard drive and with no moving parts, very cool.  My research started with a couple articles from AnandTech, The SSD Anthology and The SSD Relapse: Understanding and Choosing the Best SSD.  I think as far as technology goes the OCZ drives look like the best-bet right now against the Intel X25-M drives, the only real downside, the capacity.  Intel has a 160G drive versus the OCZ 120G and when going from 500G on my MacBook Pro, I decided the extra 40G would be better than the slight advantage OCZ has from a technology standpoint.  Maybe down the road when OCZ has some bigger drives, I may revisit them.

Intel X25-M

I purchased the Intel SSDSA2MH160G2C1 X25M from ZipZoomfly.com, who had the best prices at the time.

IMG_1225

There are no real deals out there right now since these drives are in such demand.  It is hard enough finding them in-stock, never mind a great deal.

Upgrading

The first thing to do before attempting to do something like this is to do a full backup which will later be used to restore from and be up and running quickly.  I use a great external Firewire 800 enclosure from Other World Computing with an old laptop drive inside, just for this type of situation.  The software I use for backup is SuperDuper from Shirt Pocket, which does a great job.

The process of upgrading the hard drive in the new unibody MacBook Pros is so much easier than in the older Pros from 2006 with a lot less screws and hoops to jump through.  Apple actually provides pretty clear instructions on the process of physically changing out the hard drive in the MBP Manual on their website.

Removing ten screws on the underside of the case and the cover pops right off with the drive exposed.  Two additional screws removed and the drive is out, unplugged and new SSD in place.  Pretty easy indeed.

Once the system is powered up with external Firewire drive installed and booting up into OS X from a previous complete system backup done with SuperDuper, format the SSD with Disk Utility and perform a restore with SuperDuper to the new SSD and you’re done.  The original backup took just under an hour, the restore just over 1/2 hr. 

Finally and Most Important

Rebooting OS X from the new drive really shows how snappy these drives are, but booting is not the key differentiator.  I decided to go about my business and do the things I do everyday; email, bringing up a web browser, loading RubyMine as well as a half dozen other tasks.  After about a half day of use I could really notice the difference when doing these tasks, no spinning beach ball, minimal bounce of application icon when loading and an overall smoother experience.

I don’t have benchmarks to show as I don’t really care how much faster the SSD is than the traditional hard drive, I only care the SSD has removed the pause.

When these small pauses are removed from my workflow, everything goes smoother.  I feel more efficient, I am getting more done.  This time savings and overall efficiency will pay for the drive in no time.  It would certainly not be fair to compare gigabyte per dollar of SSD vs. traditional drives, it goes much deeper and the benefits much greater with SSD.  Yes, I am an SSD fan boy.


New Laptop Purchase Harder Than Expected

I have been running on a couple of very old laptops, one a Dell Latitude D820 and my main laptop is an Apple MacBook Pro (Intel, pre-unibody).  These laptops still work but have been feeling a bit slow over the past few months, never repaved the MacBook Pro but kept adding software and updates from Apple.  I am sure a fresh install on the Mac would do it well but I figured it was time to replace it instead.

Unlike many web developers, I write applications for both Ruby on Rails and ASP.NET, which puts me in a rather difficult position with regards to buying hardware.  Currently, writing Ruby on Rails applications on Windows is less than ideal.  The Mac is really the perfect environment for Ruby on Rails development.  On the other hand, the Mac is not really much of an option to write ASP.NET applications which leverage Microsoft SQL Server.

Thought Process

I started considering my options:

  1. Have two laptops, one for Ruby on Rails and one for .NET development.
  2. Buy a new Dell (or some other brand) which included the new Intel i7 processors (mobile quad core and really fast), set it up for .NET development and run VMWare Workstation with a Linux VM for Ruby on Rails projects.
  3. Buy a new MacBook Pro with the mainstream Intel Core 2 Duo processor, set it up for Rails development and use VMWare Fusion to run Windows 7 in a VM for .NET development.

The decision was a lot harder than I thought it should be, going back and forth many times between getting a new Dell XPS 16 which had an Intel i7 processor on it with gobs of RAM and high resolution screen to the MacBook Pro, which I have really loved.  I have to admit the price difference was a real factor because I could get a state-of-the-art processor along with all the RAM I wanted and great screen real estate for the price of 15” MacBook Pro with 4G RAM and average screen resolution.  The 17” MacBook really put the price out of my budget for now.

The Dell XPS 16 is really a great system and would probably serve me very well but the nagging feeling of writing Objective-C in the future or a solid system for Ruby on Rails work kept swinging me back to the MacBook Pro.

The Decision

I spent several weeks going back and forth on the best decision with the technology at hand, keeping in mine the new i7 processors coming out by Intel, and hoping Apple might announce a new i7-based MacBook Pro but to no avail.

It really came down to what I really wanted to do with the new system and what I needed to do.  I want a first-class environment for writing Ruby on Rails applications, sadly Windows does not offer this at the time.  Running Rails on Windows is just a mess and not a challenge I am willing to take on.

The decision came down to a new Apple 15” MacBook Pro, 2.8Ghz, 4G RAM, 500G HD.  I can continue to run VMWare Fusion with Windows VM’s and have very adequate performance.

UnibodyMBP

Additional factors which led to the MacBook Pro purchase is the ability to have a great environment for exploring other languages such as:

  • Clojure
  • Scala/Lift
  • Python/Django

I can easily have support for these languages on the Mac OS X.

Upgrades

One upgrade to the MacBook Pro coming in the near future will be a nice fast Intel SSD.  This should top off a great, fast machine for the future.

IntelSSD

I will also be upgrading to 8GB of RAM in the future, as soon as prices come down a bit for DDR3 4GB sticks.  The only time I really get tight on RAM is when running VMWare Fusion but the faster processor and SSD coming should make up a bit for some sluggishness in OS X when running a VM.

Finally

Overall the MacBook is more expensive than pretty much any comparable system but the quality of product is second to none.  When combining this with the flexibility OS X offers for developing Ruby on Rails and .NET applications either natively or a Windows 7 VM, it is a hard combination to beat.

I think I knew the decision before making it but I was hoping for that latest and greatest (i7) and save some money from the prices Apple charges for the MacBook Pros but realized how good a system the MacBook Pro is compared to everyone else in flexibility and design.

Technorati Tags: ,

Upgrading My MacBook Pro Hard Drive

TS_7K320I have been using my MacBook Pro more and more lately and quickly finding hard drive space shrinking.  The addition of VMWare Fusion and some virtual machines seems to eat up hard drive space pretty quickly.  The stock 160G Fujitsu 5400rpm hard drive is also a bit slower than I would like.

I did a bit of investigating and a couple of conversations on Twitter I found out the job of upgrading the hard drive in the MacBook Pro is a doable task with the right tools and some guidance.  I have been working on computers in one shape or form for the past two decades so I figured I could handle one MacBook Pro.  Please note, changing the hard drive yourself probably voids the warranty but, it's my MacBook Pro so why not.

The hard drive I decided to upgrade to is the Hitachi Travelstar 7K320. The drive is a 320G, 7200rpm drive with a nice cache and the right form factor.  I was able to find this drive at ZipZoomFly for $89 after a $30 mail-in-rebate.  I have had some great luck over the years using Hitachi drives so it seemed like a great deal.  ZipZoomFly always provides great service to boot.

Upgrading

I follow a few of my own steps here in conjunction with a couple tutorials I found online and from some folks who were also upgrading.

Step 1: Backup - this is huge, make sure you have a good backup of the hard drive before upgrading.  I used SuperDuper to create a full backup of my MacBook Pro.  This is NOT the image of the disk but a full backup to an external hard disk.  I have a 160G external USB drive for this purpose.  I think the back up took a bit over an hour.  

This backup should be a bootable backup, which I tested before installing the new hard drive.  Apple states they don't support booting off of an external USB drive, just a Firewire type.  I am a rebel and don't really care if Apple supports it or not, it's my laptop and I will do as I please.  Seriously, I figured if it worked, great, otherwise I would be forced to pickup a Firewire drive.  In order to book off of the external drive you need to have the MBP powered off and while holding the Option key down, power it on.  It will search devices capable of booting from and sure enough the external USB is available.  I booted from it and tried a few things and all was good.

Step 2: Remove old hard drive and install new one - I did some homework on how difficult it would be to replace a MBP hard disk before purchasing a new one.  I found a tutorial from iFixIt which gives some nice details on the process.  The tutorial is 6 pages with nice photos detailing the process, pretty hard to go wrong.  I just took my time and double-checked everything.

MacBookInternal

Step 3: Boot from external USB drive - this is, as before when testing, a key step and if it doesn't work then nothing will work from here.  Since I tested the external backup before I replaced the drive, I knew this would work.  Again, holding down the Option key while powering on which shows only the external USB as an option.  Boot worked fine.

Step 4: Initialize new drive - this was one step I never saw in any reference but the new 320G hard drive needed to be formatted. 

Step 5: Restore backup - Using SuperDuper again and now restoring from the backup to the newly formatted 320G hard disk the steps are pretty much the same as when backing up except for the new source and destination drives.  I also told SuperDuper to make the new drive as the startup drive when it was done restoring.  The restore took just about an hour and seemed much faster than the back with faster transfer rates.

Step 6: Restart - After the backup restored I then rebooted to the new hard drive and all looked well.  I did check permissions on the new disk and some seemed to be wrong so I Repaired Permissions and proceeded to test my applications and everything is now zipping right along.

I hope this helps.

Technorati Tags: ,,

Manage Servers from your Apple iPhone

I have been using my iPhone version 1 for a while now and when Apple released version 2.0 of the iPhone firmware along with the app store I was really excited pTermto see some of the applications I could use.  So far I use tools such as Twitterrific and others but really only for minimal use, until today when Instant Cocoa released pTerm which allows SSH, Telnet and TCP connections from my iPhone.  pTerm costs only $4.99 and will let me check my servers, change configuration or other maintenance from the road.

Features include:

  • SSH, Telnet, and Raw Socket (TCP) support
  • xterm terminal emulation
  • 80x24 standard unix terminal window
  • Pinch to zoom in the terminal
  • Landscape and Portrait modes
  • Support for CTRL keys
  • Works over Edge, 3G, or WiFi connections
  • Entirely based on PuTTY; if the features are in PuTTY, we can proably provide them on the iPhone!

theAppleBlog lists additional details about the application.  The web site lists the application as Version 1.0 with 1.1 ready and waiting for Apple.  You can get this version from the Apple Application Store.

 

Technorati Tags: ,,

Updated iPhone to 2.0 and the App Store

It seems Apple carefully let the release of the 2.0 firmware for the iPhone out a little early.  MacRumors was the first I saw with the announcement with a link to the download. iphone3g

I am running iTunes on Windows and had to download iTunes 7.7 to be able to do the update and access the App Store later on.  Once iTunes was up-to-date with 7.7 and with the iPhone connected and viewing the summary screen, click Check for Updates while holding down the Shift key.  This invokes the ability to install firmware manually.  It is very important to backup your iPhone BEFORE updating the firmware.  You will have the option of restoring all of your data to the iPhone once the update is complete.

The update takes some time but is hands-off and easy.  Once it's done you can restore your data from your backup and the phone resets and shows in iTunes with the new 2.0 firmware version.

iPhone20

Heading over to the App Store revealed a whole bunch of really cool things to try and Twitterrific was the first one to give a go and it worked the first time.

TwitterrificIPhone

I imagine Apple will release the 2.0 firmware for the general population later tonight or tomorrow.  Before upgrading, when I clicked Check for Updates it said 1.4 was the latest, that will change soon

I think we are going to see a revolution in mobile applications with the opening of the App Store.  This is going to be cool.

Technorati Tags: ,

Apple Time Capsule not a Happy VPN Participant

specs_timecapsule_20080115 I have been a happy owner of an Apple Time Capsule for the past month or so.  It was very easy to setup and configuring it to work with Time Machine was a breeze and backups seamless.  I have been using a Linksys 54GL router as my main router and used the Time Machine as a backup and additional wireless station.  I came home last night to find I had no network connectivity.  A call to Charter Communications tech support pointed to my router and it sure seemed like it but Charter has been known to have problems and not admit them.

I decided to reassign my Time Capsule as my main router last night and make the transition sooner rather than later.   Reconfiguring the router was as easy this time as the last time and in the matter of an hour I had our network with both wire and wireless clients back up and running.

VPN is the Show Stopper

Everything was fine until today when I needed to VPN into a client site to get some work done and I could not connect.  I thought it may have been some configurations settings on the Time Capsule but I found thing obvious, like "VPN Configuration Here".  So I decided to check out the Apple support site for a solution.  I was greeted by a nice discussion on Apple's Time Capsule support forum by many others having the same problem with no fix.   You can see I am not the only one.

AppleSupport1

I am running the AT&T VPN Client, when trying to connect I get a message saying it's authenticating but it just times out.  Time Capsule firmware 7.3.1 is supposed to fix VPN issues but has not fixed mine as I verified I have 7.3.1.

One option suggested is to setup the Time Capsule as a pass-through device.  This will only work if you have another device behind it if you need DHCP.  In my opinion, this is only a hack any and Apple should address issues like this if they plan on being an enterprise player.  Today so many of us are either consultants to enterprises or telecommuters to enterprise companies and being able to VPN to sites is important.  Maybe enterprise is not on Apple's radar and this is a perfect example.

Another possible solution for the AT&T VPN client is to turn off IPv6.  I have had some IPv6 issues on Vista and this may be the issue but hadn't had time to try it out, but based on the support forum it worked for some:

AppleSupport2

A Step Back

This morning I took my Linksys 54GL and hooked it back up and it worked.  I think Charter has some issues they weren't very open about or were doing some updates to infrastructure because the Linksys would not connect last night with two Charter network support folks and myself.  Today is a different day and the Linksys has saved the day, the work day anyway.

I am going to revisit some workarounds until Apple has better support for VPN. I likely won't be able to until I get some free time and connecting to clients isn't required for the day.   Anyone with a solution, please comment or send me an email.

Technorati Tags: ,,

Time Capsule Up and Running

I found some time this weekend to unpack the Time Capsule, set it up and perform my first back up.  I was going to provide the "unboxing" post I mentioned in a previous post but lost interest.  I am sure there are a ton of those types of posts out there if someone wants to search for them.  One thing I was surprised by was the size of the device.  It is a lot smaller than I expected and almost completely silent.

TimeCapsuleRunning

 

Setting up the Time Capsule

The first thing I needed to do to install and configure the Time Capsule was to install the Airport utility off of the included Time Capsule CD.  Once installed I ran the Airport Utility from the Applications->Utilities folder. 

I chose to setup Time Capsule wirelessly since it is the easiest, if it works.  It is pretty interesting that my MacBook Pro disconnected from my local wireless network and connected to the Time Capsule.  I probably shouldn't be surprised, but I was.

The overall configuration was very easy, just stepping me through the configuration using a wizard.  I have an existing wireless network so I just added the Time Capsule to use that network.  I could have just as easily replaced the current network with the Time Capsule since it is a full Airport base station.  I may end up doing that at some point to take advantage of the 802.11n capabilities, but for now I just wanted to keep it simple.

Once I stepped through using the wizard the Time Capsule rebooted and my MacBook Pro was back on my original wireless network.   The amber light experienced on the Time Capsule during setup was now a nice green color, indicating all was well.

The First Time Machine Backup

I took my MacBook Pro and ran Time Machine for the first time and was delighted to see it find my Time Capsule right away and told me it would be starting a backup in 2 minutes.   I told Time Machine to skip my VMware Fusion virtual machines so it wouldn't be backing those up all the time.

The backup started right on time and found 45g to backup.  The backup seemed to run very slow, taking about 16 hours to complete.  I am on a 802.11g network but I just figured it would take a lot less.  I didn't try to figure out how long it should take but it was a lot longer for this initial setup.  I will be monitoring this in the future so I can determine if I need to change some things to get better performance.

Connecting with Windows Clients

I bought a Time Capsule so I would have Time Machine natively recognize it but also to backup my Windows clients too.  I was a little concerned with Apple's support for Windows clients but was pleasantly surprised by the experience.  The key is to make sure File Sharing is turned on as seen in this screen shot.

TimeCapsuleFileShare

Notice also the Workgroup is the Windows Workgroup on your network.  Once I set this and performed an Update the Time Capsule appeared in the list of my network devices in my workgroup.  Bringing up Windows Explorer shows the Time Capsule named Backup in the list:

WindowsExplorer 

When selecting Backup in the tree the user is prompted for credentials.  I was not sure of the user name so I chose the name of the device, Backup, and the password is the one chosen during the initial setup.   I was able to connect right away and create a new folder for my Windows files.

WindowsExplorerConnected

You can see the folder Time Machine created for my MacBook Pro backup.

Conclusion

I am really happy with the experience of setting this device up, it was easy and just worked.  I will follow-up later once I use it for a while both from my MacBook Pro and from Windows.   The only downside to the experience was how long it took to perform the initial 45g backup, which was a long time.  I may not have had my expectations set correctly.

The status back in Time Machine only tells the user how many files it is backing up, how much data needs to be backed up in total and a running status of the amount of data backed up.  I would like to see an estimated time to completion and more importantly, my current data transfer rate.


Apple Time Capsule is Delivered

Today was a great day when the Fed Ex driver showed up two days early with my Apple Time Capsule.  This is the best I can show right now:

TimeCapsuleView 

I am going to be on the road for a couple days so I can't do the unboxing photos just yet but I will get to them when I get back.  It will be a great moment getting it setup and running my first Time Machine backup.

Technorati Tags: ,

Apple's Time Capsule Cometh

AppleOrderWindow

Well, after placing my order on January 20, 2008 my 1 TB Time Capsule has shipped today!

I am very anxious to get this little toy and be able to have Time Machine backup to my Time Capsule without me even thinking about it.  I am planning to take a few pics of the unboxing, not because I really have to but because I have never done one of those lame unboxing posts.