Articles tagged 'bugs'
-
Rails 3.1 - Adding custom 404 and 500 error pages
January 5, 2012
This post was originally published in the Rambling Labs Blog on January 5, 2012.
As I said when announcing the Rambling Labs new site, we’ve been learning a lot of stuff while building it.
Something that we didn’t have the chance to implement on our current projects (but that we will be including soon), is adding custom error pages to the site. So far, what we were looking for was two things: a custom 404 error page and a custom generic 500 error page.
For the experience I have now with Rails, I thought this would be a piece of cake. Well, in fact… it would’ve been if we were using Rails 2. But guess what? The error handling behavior in Rails 3 is not what you would expect. Even worse, it’s broken for routing errors!
For what I could…
-
IE and the flash "wmode" madness
November 23, 2011
This post was originally published in the Rambling Labs Blog on November 23, 2011.
One of the reasons that didn’t allow me to release version 0.1.3 of the jQuery Rambilng Slider earlier this week was a really ugly bug with IE, flash and transitions from and image to a flash element and viceversa.
The problem: There are some transitions on the slider that require an image (or several) to be on top of the flash, so that it fades out and reveals the flash. This works fine on Firefox and Chrome, but when the time arrived, it just didn’t work with IE.
I did a lot of googling and the only thing that I found over and over again was to include a
param
tag inside theobject
tag, with a name ofwmode
and value oftransparent
oropaque
and to add… -
The jQuery 1.7 .animate() method and percentages
November 13, 2011
This post was originally published in the Rambling Labs Blog on November 13, 2011.
As you may know, the jQuery Rambling Slider contains several animations. Some of them depend on changing the height of a div using percentages. Like this one:
slice.animate { height: '100%', opacity: '1.0' }, settings.speed
The problem with this is that with jQuery 1.7, the ‘100%’ was getting parsed to just ‘100’, so the height ended up being ‘100px’.
Thankfully, there’s an easy workaround:
slice.animate { height: "#{slider.height()}px", opacity: '1.0' }, settings.speed
In this case, the slider is the container for the slice. So I just made the slice’s height to be animated to the slider’s total height instead of using percentages.
I submitted a bug
-
Rails 3.1 and the assert_select_jquery
October 8, 2011
This post was originally published in the Rambling Labs Blog on October 8, 2011.
Diving a little into rails 3.1, I’m really liking some of the stuff I’ve found, like the easy Ajax integration for the views and the functional tests to ensure that the behavior of the controllers is the expected one.
There is one particular method,
assert_select_jquery
, that I just don’t understand why it works how it works.Let’s say you have an Ajax request whose view to return is
content.js.erb
like this:if($('#container').is(':not(:visible)')) $('#container').show('blind', 1000); $('#container').html('<%= render @content %>');
Ok, the page renders as expected, but, as you can see, this code is not too great. We’ll talk about that later. So, say you…
-
git submodule and the libiconv-2.dll issue
September 27, 2011
This post was originally published in the Rambling Labs Blog on September 27, 2011.
Yesterday, I made a fresh install of the latest msysGit (which is 1.7.6 as of right now).
I usually set up my vim using the akitaonrails vimfiles. So last night I was trying to do as I usually do, clone the repository with
git clone git://github.com/akitaonrails/vimfiles
, and then cd into the just cloned repository and rungit submodule update --init
to get all the bundled plugins.This last command failed miserably with a
The program can't start because libiconv-2.dll is missing from your computer. Try reinstalling the program to fix this problem
message. This didn’t happen to me with version 1.7.4 from msysGit, which I had installed before I formatted…