[api] initial porting to rails 4
[webui] initial porting to rails4
update gemfile.locks