Open hisakaz0 opened 9 years ago
Hi @pinkienort same problem here when I update my repo
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.3
Installing minitest 5.8.2 (was 5.7.0)
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.1.6
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.6
Using rack 1.5.5
Using rack-test 0.6.3
Using actionpack 4.1.6
Installing mime-types 2.6.2 (was 2.6.1)
Using mail 2.6.3
Using actionmailer 4.1.6
Using activemodel 4.1.6
Using arel 5.0.1.20140414130214
Using activerecord 4.1.6
Using descendants_tracker 0.0.4
Using ice_nine 0.11.1
Using axiom-types 0.1.1
Using bcrypt 3.1.10
Using bson 3.2.6
Using bundler 1.7.6
Using carrierwave 0.10.0
Using coderay 1.1.0
Using coercible 1.0.0
Using coffee-script-source 1.9.1.1
Installing execjs 2.6.0 (was 2.5.2)
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.1.6
Using coffee-rails 4.0.1
Using orm_adapter 0.5.0
Using responders 1.1.2
Using warden 1.2.3
Installing devise 3.5.2 (was 3.5.1)
Using multi_json 1.11.2
Using elasticsearch-api 1.0.14
Using multipart-post 2.0.0
Using faraday 0.9.2
Using elasticsearch-transport 1.0.14
Using elasticsearch 1.0.14
Installing hashie 3.4.3 (was 3.4.2)
Using elasticsearch-model 0.1.8
Using equalizer 0.0.11
Using virtus 1.0.5
Using elasticsearch-persistence 0.1.8
Installing font-awesome-rails 4.4.0.0 (was 4.3.0.0)
Using tilt 1.4.1
Installing haml 4.0.7 (was 4.0.6)
Using sass 3.2.19
Using hanna-bootstrap 0.0.5
Using hike 1.2.3
Installing jbuilder 2.3.2 (was 2.3.1)
Installing jquery-rails 3.1.4 (was 3.1.3)
Installing mini_magick 4.3.6 (was 4.2.7)
Using mini_portile 0.6.2
Using mongo 2.1.2
Using origin 2.1.1
Installing mongoid 5.0.1 (was 5.0.0)
Using mysql2 0.4.1
Using nokogiri 1.6.6.2
Installing nokogumbo 1.4.5 (was 1.4.2)
Using sprockets 2.12.4
Installing sprockets-rails 2.3.3 (was 2.3.2)
Using rails 4.1.6
Installing polymer-rails 1.0.8 (was 1.0.5)
Using rdoc 4.2.0
Using sass-rails 4.0.5
Using sdoc 0.4.1
Installing spring 1.4.0 (was 1.3.6)
Installing sqlite3 1.3.11 (was 1.3.10)
Using turbolinks 2.5.3
Installing uglifier 2.7.2 (was 2.7.1)
I'm having the same issue as well. I did some digging and here's what I've found.
I am currently using paper-tabs, which has a dependency on paper-icon button. Within paper-icon-button.html is the following line:
<iron-icon id="icon" src="[[src]]" icon="[[icon]]" alt$="[[alt]]"></iron-icon>
it seems that rails is converting it from the above to this:
<iron-icon id="icon" src="%5B%5Bsrc%5D%5D" icon="[[icon]]"></iron-icon>
I'm trying to figure out how to fix it in my own project atm. But if anyone has any info on how this can be prevented, please post.
Hi @tden012 and @pinkienort ! A poor solution until the @alchapone solve the problem is inject this code in your project for exemple. Solved, however the solution is aesthetics
paper-icon-button * img{
display:none;
}
paper-fab * img{
display: none;
}
Thanks @glaucomunsberg, I'll give it a go :-)
Having the same problem. Is it a rails problem or a polymer problem?
@agnewtj I believe that is a polymer-elements-rails problem 🙂
I think the problem is inside Sprockets. I traced Sprockets code using 'rake assets:precompile'. Nokogiri is called many times, apparently to re-code links. Nokogiri seems to recognize "src=" as a special attribute, and it appears to escape its value. Although I haven't located the spot where it happens.
As a workaround, I hacked paper-icon-button.html inside this gem, changing 'src' to 'isrc':
(line 110) <iron-icon id="icon" isrc="[[src]]" icon="[[icon]]"></iron-icon>
and hacked iron-icon.html: (line 137) isrc: { (line 157) return this.icon || !this.isrc; (line 177) this._img.src = this.isrc;
Any Sprockets experts out there? I could use a pointer or a hint to track down the bug and devise a permanent fix.
@agnewtj I suppose that it's a good way, @alchapone what you think about that?
I've tracked down the bug further. Here's a more sensible workaround. It's a patch to polymer-rails:
In polymer-rails/lib/polymer-rails/xml_adapters/nokogiri.rb, line 44, change:
doc.css("head,body").children.to_html(encoding: ENCODING).lstrip
to:
doc.css("head,body").children.to_html(encoding: ENCODING).lstrip.gsub(/%5B%5B/,'[[').gsub(/%5D%5D/,']]')
This seems to be the simplest patch until an upstream fix can be made to Sprockets or Nokogiri.
Hello, @alchapone . I'm creating a rails application with this gem. I used paper-icon-button element, then, the icon(iron-icon) was not displayed.
Environments
Rails error message and screenshot is below.