my environment:
F:\>ruby -v
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
F:\>rails -v
Rails 3.0.5
需要用到圖文編輯框時,自然想到了fckeditor,查找網上的文章,大同小異,如:http://www.blogjava.net/rocky/archive/2006/11/04/rails-fckeditor-integration.html 是2006年的。
按照文章的方法,在rake fckeditor:install 時,總是出錯,首先是:
no such file to load -- config/environment
我打開 task 文件,修改了這個路徑。
接着又報錯:
wrong number of arguments (2 for 0)
.../demo/vendor/gems/ruby/1.9.1/gems/railties-3.0.5/lib/rails/deprecation.rb:6:in `run'
又查不到相關的資料,在羣裏問了一句,[南京]蝸牛同學 答:fckeditor已經升級叫ckeditor了
搜索,果然有ckeditor的gem, install成功。
使用方法在這裏,需繼續研究:http://rubydoc.info/gems/ckeditor/3.5.3/frames
再次鳴謝 [南京]蝸牛同學。
希望本文可以幫到遇到同樣問題的朋友。
在安裝ckeditor時也遇到了問題,參見:http://runupwind.iteye.com/blog/1042127