Sunday, April 15, 2007

Macy's 61st Annual Flower show, featuring India this year...

We went to city yesterday to spend a evening, eat some good food and there we bumped into Macy's building. What we see is this

Like every year Macy's celebrates one country in their annual event, this year they were featuring India in their "Macy's 61st Annual Union Square Flower Show". This affiche covered the whole building with amazing art work and vibrant colors representing Indian culture.
The interesting part of this whole event was not inside, it was outside. They had a huge Ganesha idol right up in the main entrance and it was fabulous how it was adding excitement to this whole show. This simply reminded us Ganesh Chaturthi whole India celebrates every year August-September.
As we walked inside Macy's most of things was designed around this theme and some part was designed like Indian bazaar where they were selling more contemporary/ethnic things , with Indian dub music running in the background.
Guess we were lucky to be there and see this marvelous piece of work and gala observance because it was last day of the show.

Tuesday, April 10, 2007

Ruby TypeError (singleton can't be dumped):

This error is very interesting and can possibly waste a lot of time , if you do not know the main reason behind it. I'm sharing this here, so that all those programmers who will possibly run into this issue, Google it for solution and will eventually land on my blog post and hopefully I will save someones day.

Issue is : TypeError (singleton can't be dumped): Now when you are running a Rails app, this will be dumped into your development.log or production.log depending on your application environment.

Full trace will look something like this

/usr/local/lib/ruby/1.8/pstore.rb:348:in `dump'
/usr/local/lib/ruby/1.8/pstore.rb:348:in `dump'
/usr/local/lib/ruby/1.8/pstore.rb:326:in `transaction'
/usr/local/lib/ruby/1.8/cgi/session/pstore.rb:90:in `update'
/usr/local/lib/ruby/1.8/cgi/session/pstore.rb:97:in `close'
/usr/local/lib/ruby/1.8/cgi/session.rb:330:in `close'
.//vendor/rails/actionpack/lib/action_controller/base.rb:1015:in `close_session'

Root cause: In your Ruby/Rails code you are trying to add a singleton class in the session, which is against the compatibility rules. So look for pure singleton class or Modules that's getting added to the rails session.

Solution: Have a class inside the Singelton class which will hold the data that you want to store in session and add that to your session. This will work.