Ideally you'll have some portion of your app that can run client-side and talks to your backend using XHR/fetch/web sockets. The portion that runs client-side can be bundled in a PhoneGap app with access to whatever plugins you install. You'll need to configure the following as well:
* whitelist plugin to allow network access and navigation
* Content Security Policy meta tag (restricts/enables access to resources based on content type)
* Cross Origin Resource Sharing on your server (PG apps will come from file://, which means you will need to accept Origin: null)
If you can share more about your app & its architecture (I've never used rails -- have only heard it in passing), that would help.