Archive for June, 2010

28
Jun
10

Uninitialized constant MysqlCompat::MysqlRes when running rake tasks in Rails.

Having just recently upgraded my Rails install to 2.3.8 from 2.0.something, I started to set up a redmine site when I ran into the following error when trying to run the rake task:

rake db:migrate

This was frustrating!

!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
rake aborted!
dlopen(/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle, 9): no suitable image found. Did find:
/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle: mach-o, but wrong architecture - /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle

Looks like I was going to have to dig around and see what was broken. The message told me that the gem for MySQL connectivity was not bundled anymore in Rails so I was going to have to install it on my own.

I issued:

sudo gem install mysql

and it looked like it was installed correctly but when I tried to run the rake task again I got the same error along with a whole string of errors for missing documentation in rDoc (which I could care less about but if you are reading this you an flag for no rDoc on the gem install so don’t let a bunch of errors freak you out)

I decided to uninstall the gem and install again – and for those of you asking, I use sudo so that these all end up in the /Library, not the ~Library

sudo gem uninstall mysql
Select gem to uninstall:
1. mysql-2.7
2. mysql-2.8.1
3. All versions

I selected 3 and uninstalled all the MySQL gems from my whole system.

The problem here isn’t that Rails or MySQL is broken, it’s that Rails can’t talk to MySQL because the gem can be needing different configurations for different architectures. I also stumbled through a MySQL install which upgraded me from MySQL 5.1.42 to 5.1.48 that I didn’t need and also tried this: (with the flags for no docs so I don’t get all the command line errors.

sudo gem install --no-rdoc --no-ri mysql -- --with-mysql-dir=/usr/local --with-mysql-config=/usr/local/mysql/bin/mysql_config

But I was still getting the abort errors on the rake task. That was until I stumbled across this post:

Basically this shows how to install the mysql gem with environment and architecture specific flags. I ran through the gem uninstall and then reinstalled it again with:

sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Once this was done I attempted to run the rake task again and was rewarded with the full redmine install of all MySQL databases, and a minute later had my redmine install up and running.

Advertisements
24
Jun
10

CodeIgniter and switch from Subversion to Mercurial

Recently CodeIgniter, a product form Ellis Labs, switched their version control system from subverison to mercurial. After reading several forums where users were finding this out a little late and were disappointed about it I decided to investigate further. What I found surprised me.

As I mentioned in the my talks on version control at the Lasso Developers conference, there’s a major divide in the version control world, viz. centralized vs. decentralized version control systems. Subversion, perforce, cvs etc are all centralized version control systems, while git and hg (mercurial) are distributed. Check this link for more info.

Previous to the move, many users of CodeIgniter used svn externals to link to the latest CodeIgniter build across many of their websites. When Ellis Labs switched to Mercurial they didn’t realize that many users had linked to their libraries this way. In fact, it broke a lot on installations and many users setups for their sites when they went to update them again.

There’s a forum thread over at the CodeIgniter website about the switch and you can see why a lot of people aren’t happy. Basically, mercurial doesn’t support externals at all. This is pretty sucky. Maybe I’ll put CodeIgniter under version control at github so that instead of having to download the zip files all the time now that I can just use git submodules instead.

13
Jun
10

The Rest of WWDC

Wow, the next few days of the conference have flown by. It’s amazing how super saturated my brain feels. I hardly know where to start with the updates but I will start with the picture below.

During WWDC we’ve heard a lot about the application store and how many apps are downloading at any given time. This is a matrix of 30 displays that was on the second floor of the Moscone center. The icons that you see falling represent app purchases in the store. Every time on app is purchased on icon falls to the bottom of the screen.

wwdc_istore_app.jpg

What’s interesting about this is that the screen will fill up and refresh every few minutes. The bottom falls out like the old “Connect-4” game and all the apps start to slide out the bottom and then fill up again until the monitors fill up.

The display is actually powered by 30 Mac Pro computers behind this wall that each render a portion of the video and the respective icons. The whole application, which runs in Objective-C and takes advantage of OpenGL to render the icons and distribute the workflow across the machines.

MOSCONE_CENTER_APPLE_ICON.JPGAs far as the sessions go here was an interesting phenomenon. There were no sessions that were based on the Mac, OS X Server or pretty much anything except iPhone and iPad. For iPhone developers that’s great, but for anyone else who came to the conference looking for help with threading on OS X Server, they were not going to find much here. The much Ballyhooed 1000 Apple engineers turned out to be about 200 different engineers each day. There was nothing visible about Mac Pro’s, Final Cut, xSan or any of that other good stuff.

There are some rumors that Apple is considering separate WWDC events for Mac and iPad/iPhone. Looks like there is just too much to cover anymore.

The big news from the WWDC is the iPhone 4 and developing for the iOS4 (formerly iPhone OS 4). Apparently Apple has now licensed the term iOS from Cisco for the iPhone operating system as they previously did for the iPhone trademark.

xCode4 was also announced and we got to see it crash during one of the presenters demonstrations, he made a calm recovery though that was a little slicker than Job’s iPhone fail. The presenter smoothly transitioned, “As I was saying, with the Developer Preview of xCode 4…”.

Apple is putting a lot of effort into the webstandards ring. WWDC saw the release of Safari 5 which has some extended debugging features and also support for more of the HTML 5 specification. It’s not perfect but it’s getting there. The biggest is Apple’s push for a new standard they are touting called WebGL. In a nutshell it uses the Canvas object in HTML5 to render 3D graphics. This is going to be big, and looks to be a huge part of why Apple has distanced themselves from Flash technology. Stay tuned here for sure.

07
Jun
10

Day One of WWDC (Stairway to Heaven)

IMG_0282.JPGThis being the first time that I’ve gone to the WWDC I was a little unprepared for the amount of people that were attending. When checking in yesterday I asked the employee that was passing out the t-shirts when people started lining up and she said they would the night before. I thought that she was just meaning that a few people would be there. Man was I wrong.

I woke up at 7 AM and headed over to the Moscone center thinking that by getting there 3 hours early and being a block away would mean that I would get a good spot in line. I could not have been more wrong. I came around the corner on fourth street and was greeted by a line of almost 3800 people. I should have been start and headed around the building in the other direction. Instead I followed the line down the alley and around the building three times until I was back at the entrance almost. I missed a good opportunity to snake a place in line as there were some traffic cones around the entrance to the parking areas beneath the building. These employees of apple were letting people by in chunks. I should have just jumped the line and cut behind the first group. I just continued on toward the end of the line..

The Moscone center is a beautiful building. I’m not sure when it was built but it’s clean and open space mirrors cleanly Apple’s design philosophy. Once I entered the building there was a large bank of escalators that rises through the floor. We were steered through some serpentine barriers and then have to stand in a long hall for a period of time which was about two hours. After that we looped clear around the whole second floor area and to another bank of escalators to the third floor, at about 9:30 AM so everyone can take their seats. It’s hard walking slow and everyone is so excited. Apple employees encourage everyone to move slowly but everyone is walking briskly at a pace that is just short of a run.

Once in the auditorium I take a seat in the back row. I’m tired of standing and just want a chair. I’ve never been able to sit Indian style and have not been able to sit while the others squat down with their iPads and Laptops.

IMG_0279.JPGSteve Jobs takes the stage, this is the first time I’ve seen him in person even though he is very far away. Everyone is cheering and I see what is obviously a new phenomenon people using their iPads for placards. I see “Hi Mom” and new Zealand flags and a number of other things people are holding up for others to see.

The presentation from Steve was great, with a few glitches most notably with the wireless network not working when he expected it to. There’s plenty of other places to read about the iPhone features so I wont go into them here. I’ll be sharing more information about the conference tomorrow and the sessions I’m taking

06
Jun
10

WWDC 2010 PreConference

Our trip to the WWDC developers conference started this year with a sketchy, sketchy landing in Oakland. Many people prefer to fly into Oakland because of the cheap price and direct flights from smaller cities and we were able to find a direct flight from Boise for a modest fare.IMG_0268.JPG

Although there are a number of hotels close to the Moscone center, we chose the Mosser for several reasons. First it was inexpensive, second they had free wifi, and third it was halfway between the Apple store and the Moscone Center west. The Mosser is a hotel that recently underwent a multimillion dollar restoration, and is over 100 years old. One of the most amazing features of the Mosser hotel is the inclusion of a full music studio on the premises.

While this hotel features a great proximity to the venue, it does not have one thing, and that is air conditioning. Our room, which is a single and has a shared bathroom and shower down the hall, has a ceiling fan that we will have on high almost the whole time we are here I’m sure.

After checking in we went down to the Moscone center to register, pick up my badge and found out that the event has the most useful swag since the LassoSoft cooler bags from the Fort Lauderdale Lasso Developer Conference. We’ve got cool track jackets in force. See as pictured here.

After registering no WWDC would be complete without a trip to the Apple Store, which is one of the first built. The apple store in San Francisco is one of the first built and is a stunning example of the design that has set Apple apart as a design leader in the computing world.

Plenty of people have posted pictures of these glass staircases, in fact there’s even a story about them being sold on eBay before. I admit that I was amazed at how the stairs looked and clocking in at over 300 pound myself was a little skeptical to step on them. Supposedly the one that was broken in the New York store was cracked when someone accidentally dropped a Snapple bottle on it.IMG_0269.JPG

After leaving the Apple Store we wandered around downtown San Francisco for a while. Developers were everywhere out in force, sporting the new WWDC track jackets with the number “10” centered on the back. Almost ten years after the first Apple Store was opened, and a decade into Apple’s comeback to computing there truly could be no better time to be here.

So what’s supposed to happen tomorrow at the keynote? Rumors are flying wild but here’s a short list:

  • Rumors about Apple introducing Safari 5 popped up over the weekend, with support for Bing search, extended HTML5 support, and a new “Reader” capability. Additionally, Safari 5 is expected to add hardware acceleration under Windows, as well as a number of other features.
  • MacRumors has also “heard” that Xcode 4 will be demonstrated at WWDC, although no further details are available.
  • Many users expect Apple to announce a possible cloud-based media service as a result of its Lala acquisition. The company shut down Lala at the end of May with no replacement in sight, and thatNorth Carolina data center has to be good for something.
  • There are also rampant rumors about the next generation of the Apple TV. It’s allegedly going to be based on the same A4 processor currently used in the iPad, support 1080p video, and perhaps most controversially, may ditch the internal hard drive storage in favor of a a streaming-only system.
  • Finally, MobileMe may or may not get tiered account levels this week. Some users noticed that their accounts were no longer “Individual” but rather “Full Members” recently, indicating that there may be ways to subscribe to MobileMe in the near future without forking over a full $99 per year.

–from Ars

Time will tell. Let’s see what happens tomorrow.




Tweets

del.icio.us motion