Icon Blog
Blog

Post Mountain Lion Upgrade Syndrome

Placeholder Avatar
Tim Hemi
September 21, 2012


Article Summary

This article serves as a historical example of the challenges developers can face after operating system upgrades. It underscores the enduring importance of understanding dependencies, utilising package managers, and relying on community knowledge to resolve unexpected issues that can arise in complex development environments. The core message of “upgrade syndrome” and the need for troubleshooting remains timeless.

What You’ll Get Out of This Article

  • Operating System Upgrades Can Still Break Development Environments: Despite advancements, upgrading your operating system can still lead to unexpected issues with development tools, libraries, and dependencies. Being prepared to troubleshoot and having a rollback plan remains a valuable practice for developers.

  • Package Managers are Essential for Managing Dependencies: The article highlights the reliance on Homebrew to fix broken dependencies after the upgrade. Today, package managers (like Homebrew, apt, yum, npm, pip, etc.) are indispensable for managing the complex web of software dependencies in modern development workflows and resolving compatibility issues that can arise from system updates.

  • Community Knowledge and Troubleshooting are Crucial: My reliance on online guides and community comments underscores the ongoing importance of shared knowledge and collaborative troubleshooting within the developer community. When facing unexpected issues after upgrades or with specific software configurations, searching online resources and engaging with the community remains a primary way to find solutions.


 

I recently upgraded the OS on my Macbook Pro 13’ to Mountain Lion (OS X 10.8). As a Ruby on Rails developer, supporting many environments is a must, and the biological and technological diversity of our clients require a plethora of tools to be installed and operational on my Macbook.

Anywho I found that this guide was helpful with the upgrade: http://robots.thoughtbot.com/post/27985816073/the-hitchhikers-guide-to-riding-a-mountain-lion - Prem Sichanugrist.

Thanks Prem and to all those who left a comment detailing their experiences on the subject. I too had my own bumps to iron out and have documented them here:

With Ruby: 1.9.3p-125 I ran: gem install rails

This crashed when it was installing json-1.7.5 spitting out this message: /usr/bin/gcc-4.2 not found

hmmm… since this was installed in the upgrade drill, i checked what was installed: ls -ali /usr/local/bin/gc* 13662506 lrwxr-xr-x 1 themi staff 16 17 Sep 10:34 /usr/local/bin/gcc-4.2 -> ../Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 13610191 lrwxr-xr-x 1 themi staff 47 16 Sep 15:16 /usr/local/bin/gcov-4.2 -> ../Cellar/apple-gcc42/4.2.1-5666.3/bin/gcov-4.2

ok great so… sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 /usr/bin/gcc-4.2 (A similar fix is also mentioned in the remarks of the guide i followed) BAM!! Back in business.

With Ruby: 1.8.7p-358 I ran: rake db:migrate

I got: rake aborted! dlopen(/Users/themi/.rvm/gems/ruby-1.8.7-p358@core/gems/rmagick-2.10.0/lib/RMagick2.bundle, 9): Library not loaded: /usr/lib/libltdl.7.dylib Referenced from: /usr/local/lib/libMagickCore.5.dylib Reason: image not found - /Users/themi/.rvm/gems/ruby-1.8.7-p358@core/gems/rmagick-2.10.0/lib/RMagick2.bundle

Alright sounds like I need to upgrade something so… brew update brew upgrade imagemagick bundle install HOORAH!!

I found these solutions worked for others who had a similar issue: gem pristine rmagick or brew remove imagemagick gem uninstall rmagick bundle install lastly: RAILS_ENV=development lib/daemons/importerd_ctl.rb start (This is a ruby file which spins up a daemon controller)

NOTE: I Typed: RAILS{up_arrow}{enter} relying on the bash history to autocomplete then I got: env: ruby\r: No such file or directory

Naturally it took me a while to realise what was up but I eventually got there… rm -f ~/.bash_history ZING!!

It turns out that the history file had escape codes in it that appear to be interpreted differently now. So that was my experiences, I am very happy with Mountain Lion, sure there was no wow factor in the upgrade but its the small things that make up the total experience.

So I would like to close with my favourite quote:

“Man is the creator of change in this world. As such he should be above systems and structures, and not subordinate to them.” - Steve Jobs

Happy Coding - Tim Hemi