Integrating Polymer/Web Components with Rails and the asset pipeline

2,421 views
Skip to first unread message

andre...@gmail.com

unread,
Feb 27, 2014, 1:11:49 PM2/27/14
to polym...@googlegroups.com
I'm trying to come up with a way to use polymer with Rails, but there isn't much out there on the subject.

My thoughts are to handle web components like Javascript or CSS in rails. There will be an 'app/assets/elements/application.html' which defines what elements you want to be included. Then the asset pipeline needs to pull out dependencies for those elements and import them first. I also imagine in production all the web components will be concatenated into one html import (like Vulcanize does).

The only problem is, I have no idea where to start on developing this. Is this something people want to see, and does anybody have any pointers on how to get started?

So far, I've asked a question on StackOverflow that is really basic, but it received any answers.

Anyway, your thoughts are appreciated.

Ahuth

unread,
Mar 7, 2014, 2:13:50 PM3/7/14
to polym...@googlegroups.com, andre...@gmail.com
For anyone who stumbles across this, I've created a ruby gem to integrate Polymer web components into the Rails asset pipeline.

Addy Osmani

unread,
Mar 10, 2014, 7:06:40 AM3/10/14
to polym...@googlegroups.com, andre...@gmail.com
This is really interesting work! Thanks for sharing.

Ahuth

unread,
Mar 10, 2014, 1:28:22 PM3/10/14
to polym...@googlegroups.com, andre...@gmail.com
Thank you! Polymer itself is really interesting, and it seems like a way of making web apps that I just "get" better.

That being said, it doesn't seem like many people have tried to use Polymer with Rails. That's a shame because the Asset Pipeline would excel at importing and packaging up web components.

pe...@unikey.com

unread,
Jul 28, 2014, 4:40:29 PM7/28/14
to polym...@googlegroups.com, andre...@gmail.com
I used the emcee gem to try and package up, but when the files are compiled on our nginx server, they can't be referenced from within rails.

pe...@unikey.com

unread,
Jul 28, 2014, 4:40:34 PM7/28/14
to polym...@googlegroups.com, andre...@gmail.com
I used the emcee gem to try and package up, but when the files are compiled on our nginx server, they can't be referenced from within rails.



On Monday, March 10, 2014 1:28:22 PM UTC-4, Andrew Huth wrote:

alex.cha...@gmail.com

unread,
Aug 4, 2014, 3:43:04 AM8/4/14
to polym...@googlegroups.com, andre...@gmail.com, pe...@unikey.com
Have you tried to use this gem https://github.com/alchapone/polymer-rails ?

Вівторок, 29 липня 2014 р. 00:40:34 UTC+4 користувач pe...@unikey.com написав:

Andrew Huth

unread,
Aug 4, 2014, 10:39:29 AM8/4/14
to polym...@googlegroups.com, andre...@gmail.com, pe...@unikey.com
Can you provide some more details regarding what you're trying to do, and what issues you're having? Also, if you're on GitHub, could you do me a favor and raise an issue there?

It's a little easier to provide more details/examples there than it is here.

Thanks

Andrew Huth

unread,
Aug 4, 2014, 10:50:00 AM8/4/14
to polym...@googlegroups.com, andre...@gmail.com, pe...@unikey.com, alex.cha...@gmail.com
polymer-rails looks like a nice gem! Looking at its source has taught me a few things I can improve in Emcee. Well done!

alanl...@gmail.com

unread,
Sep 5, 2014, 3:47:55 PM9/5/14
to polym...@googlegroups.com, andre...@gmail.com, pe...@unikey.com, alex.cha...@gmail.com
I must commend you Mr. Huth, I've been diving into polymer today and all my questions seem to bring up google groups where you're working on the same thing. I want to incorporate an existing rails project into polymer or the other way around. Have you learned anything since august?

erik.m...@gmail.com

unread,
Sep 22, 2014, 3:40:51 PM9/22/14
to polym...@googlegroups.com
Hi, something new ? I am also interested in for using polymer in some existing projects.

eveev...@gmail.com

unread,
Jun 4, 2015, 3:00:08 PM6/4/15
to polym...@googlegroups.com, erik.m...@gmail.com
Well, Now we are on June 2015 and Polymer (1.0) is "Production Ready". I saw that all this gem are deprecate, What is the best way to use Polymer with Rails? 

alex.cha...@gmail.com

unread,
Jun 9, 2015, 3:18:27 AM6/9/15
to polym...@googlegroups.com
Have you tried polymer-rails?
Reply all
Reply to author
Forward
0 new messages