Customizing error messages in Rails
Posted: October 25, 2011 Filed under: Code | Tags: Programming, Ruby, Source code Leave a comment »Searching for the answer to my question (whose subject is above), I stumbled upon a StackOverflow answer that works brilliantly. The best way would be to go through a locales file. It keeps your code neatly modularized and easily maintained.
However, how does one go about incorporating this into a view for error messages?
Updating MacPorts
Posted: June 13, 2011 Filed under: Code | Tags: apple, MacPorts, Unix 1 Comment »Sometime back I had to install Unix software behind Apple’s back – hello MacPorts. Unfortunately, as I said, this was sometime back. Upgrading was a pain because patches started flying around and error messages were nasty.
Error: Synchronization of the local ports tree failed doing rsync
To fix this, I had to checkout what was going on under the hood. So I opened the shell script that is called when you run
port selfupdate. Bad idea. The script is about 4416 lines long! Try finding a bug in that.
Sexy RVs
Posted: May 29, 2011 Filed under: Code, Discover | Tags: ruby on rails, validations Leave a comment »Did you know Rails Validations doesn’t take ‘no’ for an answer? Literally! I tried it and got this from her, “no [false] is an invalid option. Expecting yes [true], Hash, Regexp, Range or Array”. Hash, Regexp, Range and Array are her four husbands – she’s inverse Muslim.
That’s amazing though, “no” is not an option. Now that’s one chic I would like to have fun with. Hope Mr. Validations approves
p.s: to all those who choose to interpret this as me having conversations with a sex worker – Fox News, your colleagues overseas and other cohorts – please research properly for some clarification before flaunting your lameness; it only makes us sensible folks laugh to our heart’s content.
Backward is the new Forward
Posted: May 15, 2011 Filed under: Code, Discover | Tags: FAQs Help and Tutorials, gem depreciation, Languages, Programming, Ruby, ruby on rails, textmate Leave a comment »Sometimes to move forward in life, one has to take a couple steps backward. I mean, this is why people study history, isn’t it? So one can understand the past and walk in its ways when the future seems unclear. That’s why people also say to know your roots, I guess. I don’t mean turning and facing the worse things in life hoping to arrive at a better place. That’s just lame and is something the 25th century me would do. Keep looking forward but when things are not so good, the best way to keep going forward is with a couple back steps.
To all gem vendors
Posted: May 9, 2011 Filed under: Code, Observe | Tags: gem, gem depreciation, Ruby, rubygems 1 Comment »Please update your gem bundle. It’s annoying to be working on an application smoothly one moment and after an update – meant to make things better, a flood of the same error message: “NOTE: Gem::Specification#default_executable= is depreciated with no replacement. …”
Please please please update and release a “more pristine” package of your gem. The flood in the Mississippi is enough tragedy; developers should not have error messages flooding their Terminal window.
Thank you.
