[api] initial port to rails 4.1
[api] Fix for ThinkingSphinx 3.1