2011-12-14 153 views
3
Rails 3.1.3 
ruby-1.9.3-p0 

CKEditor的路徑軌資產奇怪生產

rails gckeditor:install --path=app/assets/ckeditor 

active_admin.rb

config.register_javascript 'ckeditor/ckeditor.js' 
config.register_javascript 'ckeditor/config.js' 

production.rb

config.assets.compile = true 

Firebug的網絡日誌

http://192.168.232.130:3000/admin/posts/new 
http://192.168.232.130:3000/assets/active_admin-8d11a9c33e6523c7caa3885e639a6141.css 
http://192.168.232.130:3000/assets/active_admin-d9973bd5416a9bd593fceac194c20b0c.js 
http://192.168.232.130:3000/assets/ckeditor/ckeditor-e04a6d38d55af60f6ce20610e5b0e7eb.js 
http://192.168.232.130:3000/assets/ckeditor/config-c9d860941a21f95f832013923f6cb981.js 
http://192.168.232.130:3000/admin/posts/config.js?t=B8DJ5M3 
http://192.168.232.130:3000/admin/posts/skins/kama/editor.css?t=B8DJ5M3 
http://192.168.232.130:3000/admin/posts/lang/en.js?t=B8DJ5M3 
http://192.168.232.130:3000/admin/posts/plugins/embed/plugin.js?t=B8DJ5M3 
http://192.168.232.130:3000/admin/posts/plugins/attachment/plugin.js?t=B8DJ5M3 

奇怪的是,軌道載荷JS第二次錯誤的URL

http://192.168.232.130:3000/admin/posts/config.js?t=B8DJ5M3 
http://192.168.232.130:3000/admin/posts/skins/kama/editor.css?t=B8DJ5M3 
http://192.168.232.130:3000/admin/posts/lang/en.js?t=B8DJ5M3 
http://192.168.232.130:3000/admin/posts/plugins/embed/plugin.js?t=B8DJ5M3 
http://192.168.232.130:3000/admin/posts/plugins/attachment/plugin.js?t=B8DJ5M3 

如何解決?

回答

0

active_admin.rb

config.register_javascript '/assets/ckeditor/ckeditor.js' 
config.register_javascript '/assets/ckeditor/config.js'