所以我开始构建一个gem,这很困难,但它似乎到目前为止工作.. 除了一件小事情,资产。我试过把它们放在我的lib/assets
,app/assets
和vendor/assets
。但他们似乎没有加载。开发轨道引擎和使用资产管道
我有一个测试应用程序加载我的宝石来测试它,但似乎没有任何工作。我在我的宝石中有一个引擎,我确定它正在加载。
我还需要知道什么才能开始工作?
编辑:
这里是我的引擎(位于lib/baco/engine.rb
):
require 'rails'
module Baco
class Engine < Rails::Engine
end
end
编辑2:
这是我的CSS文件(位于vendor/assets/stylesheets/application.css.scss
):
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
*= require baco
*/
input {
padding:10px;
}
大鼠,我希望这是问题。你有Gem根目录下的供应商文件夹(不在lib中)?你如何引用Gem中的资产? –
是的,我有一个名为'application.css.scss'的文件位于'vendor/assets/stylesheets'中。 –
有没有很好的方法来调试呢?例如跟踪资产管道使用的路径..? –