2012-03-16 2 views
0

Rails 3 용 puny_mce 프로젝트가 업데이트되지 않은 것 같습니다. 누구나 실행할 수 있도록 도와 주시겠습니까? 매우 간단한 편집기가 필요하고 tiny_mce의 모든 첨부 기능이 필요하지 않습니다.Rails 3 용 puny_mce 편집기 설치 방법

내가 오류는 다음과 같습니다

./init.rb <-- ActionView::Base.send :include, PunyMCE 
./lib/puny_mce.rb <-- module PunyMCE 
./public/javascripts <-- all the js/css/images/html etc 
./tasks/puny_mce.rake <-- the rake installer script 

사람이 단계를 설명 할 수 :

$ rails plugin install git://github.com/imanel/puny_mce.git 
$ rake puny_mce:install 
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /data/rails/tracker/Rakefile:7) 
rake aborted! 
Don't know how to build task 'puny_mce:install' 

vendor/plugins/puny_mce에서? 또는 레이크 설치 스크립트를 어떻게 업데이트 할 수 있습니까?

답변

0

어제 밤에해야만했고 다음 프로세스가 진행되었습니다. 설치 레이크 작업을 실행하지 않았지만 플러그 인 디렉토리의/assets 디렉토리 (public/javascript 디렉토리가 아닌

)에 필요한 자산을 복사했습니다. 즉/vendor/plugins/puny_mce/public 디렉토리를 복사합니다./자바 스크립트/

그런 다음 파일 공급 업체를 편집/자산/punymce에 punymce 은/플러그인 라인/puny_mce/lib 디렉토리/puny_mce.rb include_puny_mce 방법의 하단에

입니다 javascript_include_tag의 include_array

javascript_include_tag가 포함 할 파일 배열에 대처하지 않는 것처럼 Rails 3에서는 작동하지 않습니다.

파일을 수정하여 javascript_include_tag 메소드를 여러 번 실행하고 연결된 결과를 반환합니다. 이것은 여전히 ​​실패했습니다.

마지막으로 나는 javascript_include 태그가 "ActiveSupport :: SafeBuffer"를 반환하고 있음을 발견했습니다. (그 이유는 무엇보다도이 3 종류의 이유와 이전 버전과의 호환성이 부족하기 때문입니다.) 그래서 간단히 String 결과를 이들 중 하나로 변환하여 작동했습니다.

javascript_include_tag include_array 

tags=Array.new 
include_array.each do |a| 
    tags.push(javascript_include_tag(a)) 
end 
tag =tags.join(" ") 

t=ActiveSupport::SafeBuffer.new(tag) 
return t 

와 나는 더 우아한 방법이 확신하지만,이 변화는 확실히 작동하지만, 첫 번째로이 가서 가져옵니다

작동하는 코드를 대체하는 것입니다 레일스 3.2.2에서 확실하게 작동했습니다.

건배 조지