轨道资产生产奇怪

时间:2011-12-14 04:55:41

标签: ruby-on-rails ckeditor production activeadmin

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

奇怪的是,rails第二次加载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

如何修复?

1 个答案:

答案 0 :(得分:0)

<强> active_admin.rb

config.register_javascript '/assets/ckeditor/ckeditor.js'
config.register_javascript '/assets/ckeditor/config.js'
相关问题