Apart from Technical Topics, increasingly i find myself wanting to write about other topics that interests me - Entreprenuership and Business, Leadership, Africa, Service Industry (e.g Hotels, Restaurant). My writings would always represent my opinions and it might change from time to time.

Uploading CSS files using Shrine gem

I have recently switched from carrierwave to shrine in my Rails app and i thought i follow the advice of Alan Richardson, saying when you learn something new, irregardless of how trivial it might seem to you, share it and save someone else that headache. So in the Yangah application, we upload a number of files to amazon s3 which include images, font files and css files for these fonts. However, i have found that with shrine, out of the box it was not able to correctly set the mime type for the uploaded file on s3.

Rails3 'link_to' displays literal HTML on front end

>In the last month, I have been working on a rails3 app and I ran across this interesting problem where I need to create a href link to a another page from my current page. In my view i have written <%= “Please click on this link #{link_to(‘here’, new_house_path)}” %> And interestingly this is displayed as Please click on this link <a href=“http://localhost:3000/houses/new">here</a> on the front end. Hours of frustration and google searches leads me to doing this: <%= (“Please click on this link #{link_to(‘here’, new_house_path)}“).