Tuesday, September 13, 2011

Invalid date format in gemspec


Recently I faced a issue while executing bundle update on a ruby project. The gems that got updated were cucumber 1.0.4, gherkinn 2.4.18, webrobots etc. After this update I was getting "invalid date format in gemspec" with the path of the gem in the error description on firing many of the commands like running any rake task. After looking into the *.gemspec file those were corrupted and comparing them with the other ones those were proper, I found that date format was the issue. The wrong date values were having the time value like "00:00:00.00000Z" which was not required only the date part was required. Fixing the date values solved the problems related to date format, but after that I was getting this error "Illformed requirement ["# 0.8.4"]" for 1 of the gemspec file. I finally had no clew what was going on, I simply ran few commands that solved the problem:



  • gem update --system.

  • gem update bundler.

  • bundle update on the ruby project.


Hope this helps.

Monday, September 5, 2011

Another day fixing cucumber tests because of firefox update.


After updating to firefox 6 all of my cucumber tests stopped working. Basically none of the button and link clicks were working. After debugging for a while I figured out that for some reason "click_button" and "click_link" were silently failing. I then googled about the issue and found work around for it. Here it is:



  • Instead of click_button(button_text), first find the button by invoking find_button(button_text)

  • Then call button.native.send_keys([:return]), which will perform "Enter" key on the button.

  • Same will work with link as well.


I faced the issue with following system configuration:

  • Windows XP SP3

  • ruby 1.8.7

  • Firefox 6.0.1

  • cucumber 1.0.2

  • capybara 1.1.0

  • selenium-webdriver 2.5.0