Ruby on rails rails在生产中的应用
ckeditor路径Ruby on rails rails在生产中的应用,ruby-on-rails,ckeditor,production,activeadmin,Ruby On Rails,Ckeditor,Production,Activeadmin,ckeditor路径 Rails 3.1.3 ruby-1.9.3-p0 活动的\u admin.rb rails gckeditor:install --path=app/assets/ckeditor config.register_javascript 'ckeditor/ckeditor.js' config.register_javascript 'ckeditor/config.js' http://192.168.232.130:3000/admin/posts/config
Rails 3.1.3
ruby-1.9.3-p0
活动的\u admin.rb
rails gckeditor:install --path=app/assets/ckeditor
config.register_javascript 'ckeditor/ckeditor.js'
config.register_javascript 'ckeditor/config.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
production.rb
rails gckeditor:install --path=app/assets/ckeditor
config.register_javascript 'ckeditor/ckeditor.js'
config.register_javascript 'ckeditor/config.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
Firebug网络日志
config.assets.compile = true
奇怪的是,rails第二次加载js,却加载了错误的url
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
如何修复?活动的\u admin.rb
rails gckeditor:install --path=app/assets/ckeditor
config.register_javascript 'ckeditor/ckeditor.js'
config.register_javascript 'ckeditor/config.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