fckeditor插件使用和rails2.3不兼容的解决办法

fckeditor插件使用和rails2.3不兼容的解决办法
下载包解压放到当前项目主目录下 vendor\plugins\fckeditor目录中
rake fckeditor:intall
在项目目录中出现 public\javascripts\fckeditor

里面是产生的JS文件。
在更新了Rails2.3后发现和fckeditor出现了兼容性问题。

undefined method `relative_url_root' for #
搜了一下找到解决办法如下。主要是路径PATH问题
先到 目录 vendor\plugins\fckeditor
找到文件 app/controllers/fckeditor_controller.rb
look for uploaded = request.relative_url_root.to_s+"#{UPLOADED}/#{params[:Type]}"
replace it with this uploaded = ActionController::Base.relative_url_root.to_s+"#{UPLOADED}/#{params[:Type]}"
同样在文件 lib/fckeditor.rb
replace
js_path = "#{request.relative_url_root}/javascripts"
with
js_path = "#{ActionController::Base.relative_url_root}/javascripts"

reference:

restart web server it works!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值