UPDATE (16 June 2015): An official package has been released for polymer-rails
. Please see polymer-elements-rails
, which is the new and official repository which includes iron-
, paper-
, and neon-elements
.
I will be keeping these forks up for the time being for anyone who may still have them already set as a dependency, but you will get identical functionality and prolonged support from using the official repository, so I urge you to switch if you haven't.
The polymer-rails project has been updated to 1.0, but unfortunately, the gems for the components have not yet. I've gone ahead and created the appropriate forks so that there's some working option in the meantime.
Your gemfile should have:
gem 'polymer-rails'
gem 'polymer-iron-rails', :git => "git://github.com/vsimonian/polymer-iron-rails.git"
gem 'polymer-paper-rails', :git => "git://github.com/vsimonian/polymer-paper-rails.git"
gem 'polymer-neon-rails', :git => "git://github.com/vsimonian/polymer-neon-rails.git"
Then run bundle
.
In app/assets/components/application.html.erb
you set your dependencies:
//= require polymer/polymer
//= require iron-ajax/iron-ajax
//= require iron-input/iron-input
.....
app/assets/javascripts/application.js
should contain:
//= require webcomponentsjs/webcomponents-lite
Your .bowerrc
should have the 3rd-party component directory set:
{
"directory": "vendor/assets/components"
}