[Today's Frustration] “The Invalid Gem Format” message
I was installing a gem when suddenly:
ERROR: Error installing the_gem: invalid gem format for /Library/Ruby/Gems/1.8/cache/the_gem-0.0.0.gem
I got frustrated because the error message doesn't tells much about the real error, which I still don't know what is, the only thing we can figure out reading the message is that rubygems is trying to install the gem from a directory called /Library/Ruby/Gems/1.8/cache/.
This is not the first time it happens to me, I just forgot how to fix it, this is why I wrote this post, to have a place to refer to when this happens to me again.
All I needed to do was to delete the gem from the cache folder, but, just to be sure I deleted everything:
rm /Library/Ruby/Gems/1.8/cache/*
Maybe your path is different, I found another one in the following path, so:
rm /opt/local/lib/ruby/gems/1.8/cache/*
Et VoilĂ !
[MentalNote] Hand cursor in Flex components
It's really impressive that we can do amazing things with Flex and that we can't show the hand cursor when the mouse is over a component in a straight forward and understandable way.
Every time I've needed to do that I've ended up very pissed off because I forget that the property useHandCursor=true doesn't show the hand cursor by itself in some components, I must set another properties in order for it to work properly, so here is my mental note to remember it.
For components as Image the only thing we need to do is:
<!-- MXML --> <Image id="my_image" source="path_to/image.jpg" buttonMode="true" />
or
//AS3 my_image.buttonMode = true
but for instance, for the Label component and other ones you have to do this:
label.useHandCursor = true label.buttonMode = true label.mouseChildren = false
so, what I do is to use those three properties in all the components. If the component doesn't inherits from flash.display.Sprite then I add such component to a Sprite and that'd be it.
pretty easy, isn't it? :S