开发者

Rails 3.1 SWF file not loading

开发者 https://www.devze.com 2023-04-02 08:55 出处:网络
For 开发者_开发百科some reason, the new asset pipeline is not pulling in my swf file, which I need.I\'ve tried placing the swf file in app/assets/, app/assets/flash (after addingconfig.assets.paths &l

For 开发者_开发百科some reason, the new asset pipeline is not pulling in my swf file, which I need. I've tried placing the swf file in app/assets/, app/assets/flash (after adding config.assets.paths << "#{Rails.root}/app/assets/flash" to application.rb), public/, public/assets/, vendor/assets/, vendor/assets/flash/, etc…

Any ideas?

view:

<%= asset_path('flash/swfupload.swf') %> 

…becomes /assets/flash/swfupload.swf in the source code; this matches the current path that I'm using.


I figured it out. For some reason, I had to resort to putting the SWF file in public/flash/swfupload.swf. The image that the swf file relied upon wasn't loading but wouldn't show as missing due to not using Flash debug mode. This made the SWF not load all the way. I had to call the image with the asset_path, which is expected. Thanks for the help, though.

0

精彩评论

暂无评论...
验证码 换一张
取 消