added support for mobiel devices and for Heroku issues with Rails 4 plugin