FIXING MYSQL GEM ON SNOW LEOPARD

NOTE: See my latest post for a solution for OS X 10.6.4 and later A fresh Snow Leopard (OS X 10.6) install does not have the mysql gem installed, and installing it fails because of missing header files: Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h To correctly install the mysql gem:

INSTALL GIT ON SNOW LEOPARD

To install git on the latest version of OS X (10.6), use the git-1.6.4.2-intel-leopard.dmg (or later) package from git-osx-installer. So far it works fine for me on Snow Leopard. I like how OS X comes with a large number of open source packages such as PHP, Apache, Vim, Subversion and Ruby on Rails; however, I’d really like to see Apple add Git to the list.

UPCOMING WEB BROWSER: GOOGLE CHROME 3

The beta version of Chrome has been available for a few months now with a faster Javascript engine, a better new tab look, and the Omnibox (an improved location bar). What key enhancements has Google added for developers? Well Chrome adds support for new features in WebKit: JSON.parse for securely parsing json data HTML 5 hashchange event Canvas support for the HTML 5 canvas text APIs -webkit-border-image CSS3 attribute HTML 5 channel messaging HTML 5 Input element types for Text Fields (tel, url, email, and number) HTML 5 Forms pattern and required attributes HTML 5 draggable element implementing the current spec JavaScript getBoundingClientRect and getClientRects to find the position of an element HTML 5 Video tag with support for Theora and H.264 video codecs HTML 5 Web workers For users, Chrome add support for custom themes, similar to Firefox’s personas but is more complete by changing the look of the toolbar and the browser pages (new tab page, etc.). See the Google Chrome blog for more info.

UPCOMING WEB BROWSER: SAFARI 5?

What does Apple have on the horizon for Safari as version 4 was just released 2 months ago (June, 2009)? So far we have not heard anything and that isn’t a huge surprise, Apple is a very secrative company. The good news is that Safari is based on the open source WebKit rendering engine, so we can check out the list of feature enhancements added to WebKit since Safari 4 released with AppleWebKit/531.9.

UPCOMING WEB BROWSER: OPERA 10

Opera 10 is set to be released in a few days with many CSS and JavaScript improvements, a massively updated presto rendering engine and a new visual look by well-known designer Jon Hicks. The client also now automatically updates itself, like Google Chrome. The vastly improved web standards in the Presto 2.2 rendering engine include: CSS3 web fonts with the @font-face attribute. Demo Transparency with RGBA and HSLA: hsla(240, 100%, 50%, 0.5); The Query Selectors API that is standard in Firefox, IE, and Safari: document.querySelectorAll(".alert"); Web fonts in SVG Fully passing the ACID 3 test with 100/100 Inline spell checker (very handy) Many other features It looks like this release is absolutely packed with new features and improvements and in many ways is catching up to the major players and surpassing them in other ways.

UPCOMING WEB BROWSER: INTERNET EXPLORER 9?

Internet Explorer 9 is coming. The number 9 is a guess, but Microsoft is not getting left behind in the web browser scene again. With Internet Explorer 8 being released 5 months ago in March 2009, we have little information so far as to what is going to be included in the next release. We knew two things Microsoft is doing, they are asking customers for feedback, and they are investigating HTML 5 features.

UPCOMING WEB BROWSER: MOZILLA FIREFOX 3.6

With Mozilla Firefox 3.6 the team is shifting to a shorter release schedule, so enhancements reach users sooner. It’s quite likely we’ll see more incremental releases, including Firefox 3.6 which is scheduled for release just six months after Firefox 3.5. The next version of Firefox will be faster because of improvements to the TraceMonkey JavaScript engine and because of a focus on improving startup time performance. An asynchronous location bar and improved scrolling on Windows should also provide a noticeable speed improvement. The next version will feature the Gecko 1.9.2 rendering engine.

BROWSER NOTIFICATIONS WITH YIP

Ever wanted your web application to be able to show notifications even if the user may be in another browser tab or application? Now you can! The relatively new Yip extension for Firefox adds notification functionality. This is not a small JavaScript notification that pops up in the browser tab, but one that integrates directly with the users Operating System. Yip uses libnotify/notify-osd on Ubuntu Linux, Growl on Mac, and Snarl or Growl for Windows on Windows. If none of these notification applications are installed, it will use Firefox’s simple and not as pretty notification system. Ubuntu Linux users have notify-osd installed by default, Growl is popular with Mac users, yet Windows users probably don’t have Snarl or Growler for Windows installed.

AN ALTERNATIVE TO SYMFONY’S SCHEMA.YML

The symfony web framework provides two methods for building the database model files when using the Propel Object-relational mapping (ORM) toolkit. The recommended method by the symfony team is to use the schema.yml file, where you explicitly explain your table structure. The second method is to generate a schema.xml file directly from the database. schema.yml: Just edit config/schema.yml and list your tables, columns, column types, and foreign keys in YAML form. Build the model files by running:

CATCH SYMFONY FORM ERRORS

Have you built a form while developing with the symfony form framework that appears to work fine but fails because of an unknown error? Here is the simplest and easiest way to catch most errors. First open the web page with the form and fill it in with valid input. Then, open the form php file, temporarily delete all your custom form render code and replace it with echo $form. Go back to the web page and click your form submit button. It should show you any validation errors that appear in the form but were missing on your customized version, because this time it’s rendering the form with the default settings. At the very least it could show you something you missed and hint at the solution.