不管我试图在rake deface:get_result中使用什么选择器,它都找不到它。我有工作的的代码装饰器
Deface::Override.new(:virtual_path => "spree/checkout/registration",
:name => "removes_registration_header",
:remove => "h1",
:disabled => false)现在,当我尝试做rake deface:get_result['spree/checkout/registration','h1']时,我得到了答案:zsh: no matches found: deface:get_result[spree/checkout/registration,h1]
如何正确使用rake deface:get_result
注意:我也尝试过添加bundle exec,但是结果是相同的。
发布于 2014-08-22 03:35:37
如果使用zsh,则需要用\转义方括号或任何其他特殊字符(如空格),您可以尝试如下
bundle exec rake deface:get_result\['spree/checkout/registration'\]还要确保您使用bundle exec运行rake,以确保您使用的是gem的正确版本。
从您的示例来看,您似乎不正确地使用了deface:get_result任务。它只接受一个参数,即模板的虚拟路径。我想你实际上要做的是测试一个选择器,你可以用它来做。
bundle exec rake deface:test_selector\['spree/checkout/registration','h1'\]https://stackoverflow.com/questions/25361216
复制相似问题