Jquery Full Calendar with Ruby on Rails
Contrary to popular belief, working on a client project gives us a generous margin of creativity and explore innovative solutions. Take the example of a recent project I was working on. The client required a collaboration-based calendar module for their application similar to Google Calendar. Initially we started developing it from scratch , but then, we found an awesome Jquery plugin.
“FullCalendar” provides a full-sized, drag & drop calendar. It uses AJAX to fetch events on-the-fly for each month. It also supports an intuitive interface to manage events that spans over multiple days or weeks. It is visually customizable and exposes hooks for user-triggered events (like clicking or dragging an event).
I decided to give it a try and utilize its hooks for user triggered events within our Rails application. This small effort resulted in a barebone Rails app that might provide a good base for your project which require calendar, scheduling or appointment features. I called it fullcalendar_rails and it is now available on github with a working demo at http://fullcalendar.vinsol.com.
Feel free to give your valuable feedback. I hope you will find this useful.
Update: On popular demand, I have added recurring events functionality with daily, weekly and monthly frequencies. It also allows for exceptions to recurring events including delete and edit features.
New Ruby on Rails Plugin- Launching Soon has launched
“Launching Soon” is a new plugin that VinSol has developed.
Working on client projects, we saw a pattern – the client owns a domain, which is either parked or has a blog running on it, and then they commission us to build an application. While the application is being developed, they want us to setup a landing page on the server, with a couple of links – to the blog etc. and want to capture email addresses of people who are interested in the service that the application would offer.
We actually found a few ready to use options for this. This php based paid script was one and there is also a free launching soon module in PHP/Jquery.
However, we did not find anything for Rails so Satish set out to write a plugin for it. Then we thought it would be good to integrate it with Campaign Monitor , since most of our clients use this service for running their email campaigns. And subsequently Satish extended it to add Mail Chimp integration also.
Give it a spin and send us your feedback via the LightHouse project.
Ride the Rails: Still skeptical?
Ok, so we had been shouting ourselves hoarse, claiming that Rails is all about developer productivity and joy. So is that all about it?, huh!, was the normal reaction. But isn’t that a big enough reason. Not for many people though.
Yes, we accept that there are some pain points, like hosting Rails applications at shared hosts. No we don’t need those in production, but don’t you wish it was easier to deploy a rails app for a quick review with a client (a client who can’t run it on his own machine). Yes php scores there, just throw the code on the server and you are done. Why do I still run this blog on wordpress and not typo or mephisto? The big reason is that it’s easy to let just apache handle everything.
But things might change soon with the launch of passenger aka modrails.
And the other classic allegation against Rails has been performance. Remember the discussion between JDD and DHH about CPU cycles vs. developer cycles. We are definitely headed in the direction of lesser CPU cycles for our Rails app. Rails2 made some advances towards that and with Ruby1.9 and YARV and Rubinium, we have high expectations. Also you have heard about Ruby Enterprise Edition , haven’t you?
So things might change, when people try to figure out the fastest web language or framwework , the next time around.
I and those around me here, are generally biased towards rails. Ruby makes us happy. For us the pleasure points in Rails were always far more than the pain points. The basic Rails principles of DRY and Convention Over Configuration clicked with us. Ruby’s and Rail’s simplicity and beauty clicked with us. We did not need hosting on shared hosts. We could work with Rails caching to improve performance. No wonder we were one of the early adopters of Rails in India. But today, I would like to thank the critics whose untiring rants have moved Rails in the direction of being much more than what is was a couple of years ago.
Some of those changes have been in rails, but more have been around it. If you would have noticed, most of these development are not in rails as such, but in the ruby ecosystem.
Rails provides developer productivity and joy; ease of deployment; and ever-improving performance. And no, now you don’t need to go back to Java. We knew it, I am just repeating it for you.
Extrapolate this one year old graph for yourself.
So what is your reason for not having rail-ed yet?
Update: Charles Nutter has a post on upcoming Ruby implementations here
Multiple Rails apps with Quicksilver
The ~/works directory holds all the rails applications on my mac book. Some of these are VinSol projects, current and old. Some are my personal projects and some are open source apps like beast and radiant. There is a contribute app also as per HasManyThrough Josh’s recommendation.
[13:29:11 mjuneja works]$ ls -l | wc -l
37
There are 37 rails applications right now. This is purely co-incidental and has nothing to do with 37signals. ;-)
If I run all these apps on the default 3000 port, I cannot run more than one app at a time. If I run the apps at random ports, my browser history will not be app-sensitive. I am heavily dependent on my browser’s location bar’s autocomplete feature, so choosing random ports for my apps is not an option.
I want to be able to run apps on different but fixed ports. I need to be able to make use of my browser history. Also I need to spend minimum time configuring any new app.
This is what I did
I created a YAML file called rappaport.yml. The name rappaport is a short form for “rails application ports”, the fact that my wife runs a diamond jewelery business is purely co-incidental ;-)
The yaml file consists of application names and they port assigned to them, as show in this sample below
Next, I have a ruby script ss (short for start server) in the ~/works directory.
All the rails projects have a softlink to ss from their RAILS_ROOT. To start the web server for a project, I just need to execute ss from the app’s RAILS_ROOT.
The script assumes that the application name in the yaml file is the same as the directory name under which the rails code for the app lives ( convention over configuration! )
Everytime I create a new project, I append the app name and port to rappaport.yml. Also I create a softlink to ss from the RAILS_ROOT.
So I have a fixed port and a standard command to start the server for all my apps.
The next part is training the browser to access the application, on the same port each time, with minimum intervention from me.
Here, I make use of another ruby script called browser.rb.
This script takes rappaport.yml as the input and creates a list of links in a file called dev_bookmarks.html as the output.
I need to execute this script everytime I add a new project to rappaport.yml.
This is what dev_bookmarks.html looks like
Now I just need to add the contents of this file to Quicksilver’s index.
I go to Quicksilver’s Preferences and click on Catalog and drop the file dev_bookmarks.html from finder onto Quicksilver and Click “Rescan source”
In the information panel, I select “omit source items” and “Include content: HTML Links” and Rescan source.
I can see that the content panel contains all the links.

I can see the project links in the content meaning that quicksilver has correctly parsed the content. On the attributes panel, I select “Include in Global Catalog”.
To point my browser to a rails application running on localhost, I invoke the quicksilver hotkey and start entering the project name, and quicksilver prompts me the project name, and it already knows the port number too.
Rails Developers in India recommendation
PuneRuby Guru Satish Talim recently posted about Companies in India he would recommend for Rails development. Vinsol is mentioned among the companies he recommends in his post.
Obviously makes me feel proud.
Thanks Satish.


Working with Vinsol has been one of the most rewarding and productive collaborations I've ever had in the technology industry. Manik is an intelligent and honest engineer with a great faculty for open and clear communication, and his team include some of the swiftest and keenest developers I've ever had the pleasure to work with. They're great value for money, excellent people who are a joy to know and interact with, and above all they really know their stuff