I'm trying to create a gem which represents a JS and CSS library and can be included in rails projects (currently using 3.2). All the style sheets are written in SASS and depend on the compass library.
I tried adding compass-rails
to the Gemfile of the "external" gem and including it in the gems SASS files using
@import "compass"
However, back in the rails application (which has a dependency to this gem), this results in an error message:
File to import not found or unreadable: compass.
Am I doing something wrong?
Update: It seems to work if I add gem compass-rails
to the Gemfile
of the rails application. Any change to work around that?
Thanks a lot for your help!
除了在宝石的Gemfile中添加指南针轨道外,还需要在某个地方require 'compass-rails'
,并将其添加到对我lib/your_gem_name.rb
的宝石内部的lib/your_gem_name.rb
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.