Open redbassett opened 9 years ago
@apply is a keyword used by Polymer (I think they call their notation GCSS). Probably your setup is trying to use the standard css interpreter to do the job, and not Polymer. Try to precompile your assets and use the precompiled ones in your tests. I confess to not be used to views tests, so my answer above is purely theoretical.
What is the process for precompiling? I tried running rake assets:precompile
, however it ended in an error and didn't fix the test issue:
TypeError: no implicit conversion of nil into String
(in /Users/<username>/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/polymer-elements-rails-1.0.0.pre.rc.1/app/assets/components/gold-cc-cvc-input/test/basic.html)
Sorry, I forgot this one. There's 2 ways to accomplish that.
The first, ugly but effective is to monkey patch sprockets :) (take a look at my fork of polymer-rails, monkey_patch_sprockets branch, I still thinking about a pull request to Rails/sprockets). Effective, cause you could replace polymer-elements-rails with bower.
The second one is to remove all the offending files (the way this repo is committed to), but there's still no PR available with the fixes, use the master instead gem 'polymer-elements-rails', github:'alchapone/polymer-elements-rails'.
In case you feel demotivated by these bugs, have a look at MDL - Material Design Light.
Still getting the errors after adding the Github parameter to my Gemfile
and running bundle update polymer-elements-rails
. Am I missing a step, or should that have fixed it?
(Apologies on the slow step-by-step with this.)
Update: Turns out it does completely break the rendered page though.
I think the only one who can help you is @alchapone . As I said, I took the hard way - fork, debug, patch. However I'm using Polymer for pet projects, so I feel comfortable to do nasty things like monkey patching sprockets in a fork of Rails-polymer :) and have a poor test coverage.
Hey! I'm getting the same error
TypeError: no implicit conversion of nil into String
(in /Users/<username>/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/polymer-elements-rails-1.0.0.pre.rc.1/app/assets/components/gold-cc-cvc-input/test/basic.html)
May I ask what have you done to avoid it? Big thanks for any answers!
Without implementing @lxbrito's monkey patch, I've currently not found a solution.
I am getting the following error when I run tests (but not in development):
As far as I can trace it back, this issue is actually in
paper-drawer-panel.css
(which is called inpaper-drawer-panel.html
). The CSS file has lines similar to this a number of times:@apply(--paper-drawer-panel-drawer-container);
Any idea why this is suddenly causing an issue, only in tests, and how to fix it?I am running version
1.0.0.pre.rc.1
of the gem.