Tuesday, May 24, 2011

Thursday, March 24, 2011

updating app to rails app to 2.3.4

while trying to freeze gems:

rake rails:freeze:gems --trace

I got the error

undefined method `version_requirements' for #

which is complaining about the version_requirements in Ver 2.3.4

Thanks to that Fix which replace the line:

Gem::GemRunner.new.run(["unpack", g.name, "--version", g.version_requirements.to_s])

with this line

Gem::GemRunner.new.run(["unpack", g.name, "--version", g.respond_to?(:requirement) ? g.requirement.to_s : g.version_requirements.to_s])

Hope it helps.

Saturday, February 5, 2011

#Jan25 Egyptian Revolution

ياجمال قول لابوك الشعب المصري بيكرهوك
ثورة ثورة حتي النصر،ثورة في كل شوارع مصر
ثورة ثورة حتي النصر، اما شهادة واما نصر
كونداليزا يا كونداليزا، يالا ادوا مبارك فيزا
يا مبارك صحي النوم النهاردة اخر يوم
ارحل يعني امشي، يمكن مابيفهمشي

Tuesday, February 24, 2009

Save vs Save! ROR

I had a weird problem today where the DB record was not getting saved and I was not getting an error, it was failing silently. By replacing the Rails save with the validation version of that "Save!" I got the error and figured out the error was happening validating the model.