Category Archives: ruby

Join the Next Gen force. Sokrati is Hiring…


Sokrati is looking for hiring aggressively in this month and coming ones. Please contact at ritu@sokrati .com if you are looking for a change of environment, and you have a zeal to flow with the transition from creating good to better to best.

Sokrati, a leader in digital advertising, provides a technology solution to efficiently + effectively manage search campaigns using a unique, integrated platform. The platform auto-generates keywords and bids + optimizes on behalf of the clients while dealing with 10M impressions a day. The platform is provided as a service tailored to be intuitive and fault-tolerant guaranteeing 99.99% uptime. For more visit
http://Sokrati.com

At Sokrati we promise it not be a painless journey. We squeeze our brains, grind our hearts and scrap mercilessly to carve the best softwares.

So respond asap as we are looking for people in every domain of a software development,,be it QA, Development or front-end.


Learning Java now :O


hmmm so my resume says, I know java but that was the java we did in a small course during the academics. Hence you can say that I dont know much java apart from the OO part of it which I knew from Ruby. At this stage when I am already spoilt by Ruby, it will be very hard for me to just go through Java’s classes and compilers. I am looking forward to understand and write java webservices which will feed rails apps with SOAP.

Lets see how it goes. Any suggestions if any of you guys  have?? Apart from the general Ruby community comment “You gone mad kya??? ;)


Issue with Rails 2.0.2 and Ruby 1.8.7


I had been setting up a test server yesterday for one of the app I am working on. Setting up Rimuhosting went smoothly and I was able to see this new baby online. I was happy and started testing. But just after 1-2 clicks i started getting the page. “We are sorry but something went wrong” …
:O :O :O
How did this happen???? it was working fine locally????
Well i know it happens so i checked the log. It said ActionView::TemplateError (undefined method `[]‘ for #<Enumerable… something like this.
But what is this error i couldn’t find. One more thing that i noticed was that it only happens when I am rendering something thorough ajax. This seems like error in Rails.But I was using freezed 2.0.2 version which is fine at local at both development and production mode. Yes right we are not developing on 2.1 as we are using active_scaffold and to avoid the infamous issue between the too we are still on 2.0.2.
So back to my point. I searched a lot but couldn’t find any thing which can help me. Somebody else has got the same issue and filed the ticket here. But noone else could reciprocate the error.
Then suddenly my luck hit and i got a search result in Spanish, which quote the same error i got. I took help of my best buddy Google again & ….Ahhhh ….. i feel so thankful to Blexter for posting this on his blog.
He said that Rails 2.0.2 is released before Ruby 1.8.7 which adds a method chars to class String:. Where Rails defined a method that return a ActiveSupport:: Multibyte: Chars, but if we run into a 1.8.7 we will interpret that to implement the method of a String chars, we return one enumerator so that there already can move around.
The solution he gives is easy either upgrade to 2.1 or remove the method from ruby String class by adding following code to any initializer (eg config / initializers / fixes.rb): or in enviornment.rb(For quick fix).
begin
String.class_eval { remove_method :chars }
rescue NameError
# all Ok
end

Simple na… :)

Ruby/Rails Music album


Its melodious …its amazing and i can keep humming one or other track all the time. Really i loved it :)

Chris has the music for Ruby/Rails Community.He calls is IRB Mix .Tape and its just fantastic.

Track 4 about sandboxing is just mind blowing…

$ ruby script/console --sandbox
Loading development environment in sandbox.
Any modifications you make will be rolled back on exit.

And Track 5 about underscore operator (_) .I hadnt found yet anything in irb giving the value of last evaluated expression in Ruby. But ‘_’ does this cake thing for me. Good job Chris :D

One more small thing that i learned from one of the comment….

>> 4*4
=> 16
>> 4**4
=> 256
>> 100**100**100
c:/ruby/lib/ruby/1.8/rational.rb:543: warning: in a**b, b may be too big
=> Infinity
>>


Follow

Get every new post delivered to your Inbox.