Total Pageviews

Tuesday, 21 June 2016


Export a rails single page app as a Phonegap project.
Dependency Status
This gem provides generators for the Phonegap APIs. It is intended to be used within the scope of single page web applications that have a Ruby on Rails API backend. For example, Ember.js / Rails apps.
This gem will export assets included in the rails project as a Phonegap project. This gem won't be able to export applications where content is generated dynamically by the server (e.g applications making use of eRuby).


Add this line to your application's Gemfile:
gem 'phonegap-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install phonegap-rails
$ rails g phonegap_rails:install
Edit your config file according to your environment:


Create android project

$ rake phonegap:rails:android:create
Perform all steps to create android project and run (connect phone via USB if you want to install on your terminal)
    $ rake phonegap:rails:android:initall

Other useful tasks

Export application application assets to the android Phonegap project
$ rake phonegap:rails:android:export
Build project
$ rake phonegap:rails:android:build
Launch emulator
$ rake phonegap:rails:android:emulate
$ rake phonegap:rails:android:clean
$ rake phonegap:rails:android:log


Export ios project

Xcode must be installed
TODO: This section is still pending implementation
$ rake Phonegap:rails:iOS:export