Solution:
I was using ngmin-rails gem to avoid problems with asset pipeline(Uglifier mangle) for my angular code. I never knew that third party libraries like restangular can also go through ngmin-rails. So I added the following line at the top of the pre-minified restangular.min.js
file and it works like a charm!
var app = angular.module("myApp");
BTW, I also removed this line from my application layout html: <%= javascript_include_tag "vendor/restangular.min.js" %>