10

My server is running the websocket-rails gem to handle websockets.

I'm having trouble using websocket-rails with a phonegap project that uses angular because I need to initialize the websocket-rails client in my Angular front end independent of the rails asset pipeline.

Is it possible to load the websocket-rails client separately into an angular project? Or can I use an angular socket directive to manange sockets with websocket-rails?

ajbraus
  • 2,909
  • 3
  • 31
  • 45
  • Running into this problem right now; there seem to be a lot of different ways to handle this. What did you end up going with? – Morgan Apr 24 '14 at 23:47

2 Answers2

9

I managed to get this working.

I translated all the coffeescripts into js with the coffescript CLI tool. Then I added those files to my project then called the methods in the controller per the websocket-rails docs.

ajbraus
  • 2,909
  • 3
  • 31
  • 45
0

This guy has done the same translation. A github repo with the translated files. Hope it can help someone:

https://github.com/karimbutt/websocket-rails-for-js-frameworks

halbano
  • 1,135
  • 14
  • 34