Code Monkey home page Code Monkey logo

Comments (13)

akitaonrails avatar akitaonrails commented on June 26, 2024

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.

akitaonrails avatar akitaonrails commented on June 26, 2024

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.

ahuth avatar ahuth commented on June 26, 2024

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.

akitaonrails avatar akitaonrails commented on June 26, 2024

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.

ahuth avatar ahuth commented on June 26, 2024

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.

akitaonrails avatar akitaonrails commented on June 26, 2024

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.

ahuth avatar ahuth commented on June 26, 2024

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.

ahuth avatar ahuth commented on June 26, 2024

@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.

ahuth avatar ahuth commented on June 26, 2024

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.

ahuth avatar ahuth commented on June 26, 2024

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.

akitaonrails avatar akitaonrails commented on June 26, 2024

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.

akitaonrails avatar akitaonrails commented on June 26, 2024

Never mind, already added your fork as a remote and pulled to mine :-)

from emcee.

ahuth avatar ahuth commented on June 26, 2024

Cool! I did not know you could do that. Thanks again for raising the issue.

from emcee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.