Comments (13)
BTW, I've written an article in Brazilian Portuguese (http://www.akitaonrails.com/2014/06/29/usando-polymer-com-rails#.U7CKzhbY-zA). The last section tries to show how I would add bower-rails to the mix. And the code for the demo is in my public Github account: https://github.com/akitaonrails/polymer-test. It's failing to deploy to Heroku. If anyone can check it out, that would be great.
from emcee.
I just made some updated to my github public demo. bower-rails actually works and the bower:resolve task didn't solve what I wanted. The Polymer/core-icon-button can't show it's image icons when deployed in production but it depends on Polymer/core-icons, and this one renders the icons using inline SVG, so I don't know why the icons don't show up. Probably another relative path issue between components somehow.
from emcee.
First of all, thanks for writing that blog post about Emcee and using Polymer with Rails! I never thought that something I made would be written about, and it's really cool to see it out there.
from emcee.
Sure, it's a nice project. If we can only figure out how to properly handle the component's assets that would be great. have you tried to integrate the polymer/vulcanize into the pipeline?
from emcee.
I have been able to use Polymer with this. I have not used Vulcanize with it, though. This project is really the same thing as Vulcanize for use with Rails. It's really a competitor for Vulcanize and I'm not sure how this could be integrated with it.
To be honest, I'm a little bit slow and I don't quite understand the issue. Do you have a repository that illustrates the problem, or could you give me more detail?
Thanks!
from emcee.
Yeah, sorry, you mentioned that before. Could you take a look at my demo: https://github.com/akitaonrails/polymer-test ? It works in development. See that the search icon shows up in development but doesn't when I deploy in production (Heroku, for example). Any ideas?
from emcee.
Ok, I understand now: the repo works correctly in development, but not when deployed to Heroku.
I've forked your repo, and I'll see if I can get it to work. Off the top of my head, I don't think bower-rails is necessary to get it to work.
from emcee.
@akitaonrails I haven't done any testing for this issue, yet, but I'm wondering if the fix for issue #11 has solved this. Can you see if it works for you, now? The master branch is updated with the fix.
Thanks. If it doesn't work, I'll dig into it some more.
from emcee.
Nevermind, I think I found the issue.
This line is in core-iconset-svg:
var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
The HTML compressor attempts to remove javascript comments such as this: // comment
.
This is stripping out everything after http://
in the first javascript example, leaving us with this:
var svg = document.createElementNS('http:
This is a syntax error, and the web components don't load right. I'll work on a fix for this.
from emcee.
Looks like I've fixed it. Check it out here (for the time being).
I also re-wrote some of the test app because it doesn't need bower-rails. You can see that repo here. I can also submit a pull request, if you want it.
To convert it, I got rid of all the node stuff, removed the vendor/assets/components
symlink and renamed bower_components
to just components
. Then, you don't need the build packs or the bower-rails gem. bower install
will still put stuff in the correct directory, and everything will work fine.
from emcee.
Ah, nice, please do send me the PR, I'll update my demo and my post to reflect this. And I agree, bower-rails can be removed.
from emcee.
Never mind, already added your fork as a remote and pulled to mine :-)
from emcee.
Cool! I did not know you could do that. Thanks again for raising the issue.
from emcee.
Related Issues (20)
- Issue Using Erb Templating in HTML Imports HOT 9
- HAML support for html_import_tag HOT 2
- core-icon, core-scaffold not working HOT 9
- Routing Error HOT 4
- Stylesheets linked from polymer elements aren't being precompiled HOT 3
- External stylesheets aren't being reloaded HOT 3
- Getting not valid UTF-8 when using google-map web component HOT 5
- Some paper elements break polymer HOT 7
- Image asset urls HOT 2
- Polymer/Paper path parsing issue. HOT 4
- core-icon-button not working (random src) HOT 3
- Icons within elements (e.g., paper-icon-button) not rendering; think its a pipeline issue HOT 8
- Encoding / Umlauts escaping in JavaScript HOT 4
- Support: Import on custom elements HOT 1
- paper-toast not working in Firefox and Safari HOT 4
- Reloading of stylesheets HOT 2
- core-transition throwing exception HOT 1
- Emcee Railtie cant Modify frozen Array HOT 7
- Using rails + polymer how to root in rails HOT 1
- toastr is not working on safari at mac book pro
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emcee.