Convert base64 encode string into image using paperclip

Hi,
I’m new in Ruby how to convert base64 encode string into image.
any one give some ideas…