Ruby on rails 3.1 Rails 3.1资产管道和第三方JS日历

Ruby on rails 3.1 Rails 3.1资产管道和第三方JS日历,ruby-on-rails-3.1,javascript,asset-pipeline,Ruby On Rails 3.1,Javascript,Asset Pipeline,我正在开发一个Rails 3.1应用程序,它包含一个第三方JS日历选择器(jsDatePick)。jsDatePick在images/calendar/img/中有一整套图像 运行rake资产:precompile预编译它们,但是库仍然在images/calendar/img(而不是assets/calendar/img)中查找图像。我可以将目录更改为assets/calendar/img,但它不会附加指纹散列 如何解决这样的问题 以下是与此JS库一起使用的一些CSS示例: .JsDatePic

我正在开发一个Rails 3.1应用程序,它包含一个第三方JS日历选择器(jsDatePick)。jsDatePick在images/calendar/img/中有一整套图像

运行rake资产:precompile预编译它们,但是库仍然在images/calendar/img(而不是assets/calendar/img)中查找图像。我可以将目录更改为assets/calendar/img,但它不会附加指纹散列

如何解决这样的问题

以下是与此JS库一起使用的一些CSS示例:

.JsDatePickBox .boxLeftWall .leftTopCorner{ margin:0; padding:0; width:7px; height:8px; background:url(/assets/calendar/img/boxTopLeftCorner.png) left top no-repeat;  overflow:hidden; }
.JsDatePickBox .boxLeftWall .leftBottomCorner{ margin:0; padding:0; width:7px; height:8px; background:url(/assets/calendar/img/boxBottomLeftCorner.png) left top no-repeat;  overflow:hidden; }
.JsDatePickBox .boxLeftWall .leftWall{ margin:0; padding:0; width:7px; background:url(/assets/calendar/img/boxSideWallPx.gif) #ffffff left top repeat-y; overflow:hidden; }
虽然我在这里肯定看到了一个问题(应该使用资产标签,因为这些图像不存在于没有指纹散列的资产文件夹中),但我特别寻找的一些图像不在应用程序中的任何CSS文件中。我现在想确定他们在哪里被叫

看起来其他图像是通过javascript应用的。以下是一个例子:

if (parseInt(aDayDiv.getAttribute("isToday")) == 1){
            this.setC(aDayDiv, "dayDownToday");
            aDayDiv.style.background = "url(" + this.oConfiguration.imgPath + this.oConfiguration.cellColorScheme + "_dayDown.gif) left top no-repeat";
        } else {
            this.setC(aDayDiv, "dayDown");
            aDayDiv.style.background = "url(" + this.oConfiguration.imgPath + this.oConfiguration.cellColorScheme + "_dayDown.gif) left top no-repeat";
        }
oConfiguration.imgPath的定义如下:

g_jsDatePickImagePath = "/assets/calendar/img/";

this.oConfiguration.imgPath = (g_jsDatePickImagePath.length != null) ? g_jsDatePickImagePath : "/images/calendar/img/";

谢谢你的帮助

答案是升级到Rails 3.1.1+(我升级到Rails 3.1.2),问题通过Rails运行rake assets:precompile:nondigest来解决,这会导致资产的非编译版本

是否有任何css呈现这些图像?把它贴在这里