Rails 资产在生产中很奇怪
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'
生产.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,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
怎么办使固定?
Rails 3.1.3
ruby-1.9.3-p0
ckeditor path
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 network log
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
Strange that rails load js second time and wrong 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
How fix?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
active_admin.rb
active_admin.rb