In Javascript, Rails, RSocialize, Ruby

What is Rsocialize?

Rsocialize is a gem for your ruby on rails application that enables easy installation of social media buttons. It’s a wrapper around the sharrre jQuery plugin by Julien Hany. Sharrre allows you to have nice looking social media buttons for your application.

Why did I write Rsocialize?

I wrote it for 3 principal reasons:

  1. Learning: I wanted to learn how to make a non-trivial rails gem. A lot of the tutorials I saw online allowed you to make a “hello world” gem, which is pretty simple.
  2. As a gift: This is my gift to the startup and entrepreneurial community. When I was writing my own rails application, AceMusicTeacher, I searched far and wide for a way to easily install social media buttons, but I couldn’t find any. There were gems that were specific to each social service (e.g., a twitter gem, a linkedin gem, etc.), but none that were geared to the sole purpose of easily adding social sharing buttons to your site. I came across sharrre, but unfortunately it had a php script for getting GooglePlus information and after researching the problem, I decided it might be best to recreate a ruby script to do the same thing.
  3. Fun: I enjoy creating new things, so working on my own pet project like this was not only challenging, but pretty fun too.

How do you use it?

Once you install it, you call 2 helper functions in your rails view template – one for the jQuery code and one for the html markup that the jQuery code operates on. A more complete set of instructions can be found in the gem’s README file at my github account here.

Feel free to send me some feedback on it

I would enjoy hearing what you think of this gem. Feel free to email me or if you find a bug, go ahead and let me know via the gem’s issue queue over at github.

Recommended Posts