Shiva Kumar 's Blog

Start small,Think Big


Struct in Ruby

Struct is a simple way to create a class with number of attributes without explicitly creating a class Syntax to create a class using struct 1.9.2p290 :004 >“User”,:name,:email) Where User is the class name.Name and email are the attributes of the class where passing it on the fly. So when you want to create [...]

, , , , ,

Modules and Mixins

Ruby support inheritance,child class have all the property of parent class and access to their  methods.Some call parent class as superclass and child  as subclass.Below is the simple example for inheritance .In ruby we use less-than notation like Child < Parent like parent class pushing all the property to the  child.There is nice way to see the [...]

, , ,

Expired SSL certificate throws some errors on 1.9.3 install

so if your  doing a fresh install of ruby-1.9 or later version using rvm and if you run through this error here is the solution that may help. I searched a lot .And i found the best result in github rvm repo 0curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL [...]

, , ,

Loading fonts from assets in rails 3.1

I got lot confused when loading new fonts to my project in rails 3.1 and stackoverflow confused me more ..Actually its very simple .Lets say you have list of fonts First create a fonts directory under assets folder then move all the fonts there.You want to load a font .Insert  @font-face  before the css property [...]

, , , ,