Hello there.
Sad but true : CKEditor does not work in Rails 3 projects. It's kinda strange, but I'm no expert, so all I can tell is that if CKEditor effectivly seems to work anywhere else, it won't work with ANY Rails 3 project (I didn't tried without the jquery gem, but it's included by default so...).
Even in a completly naked Rails 3 project, and without using Rails automatic javascript compilation, it just won't work. What's up with that ?
HOW TO REPRODUCE :
-> Create a Rails project. There's no change to be made in the configuration (except maybe the routes).
-> Create a view with a div containing HTML.
-> Put the ckeditor source in /app/assets/javascript
-> Add this piece of Javascript in the view :
Assuming the div you created has 'the-id' for id.
I assume you know how to render the view : just watch the result, open the console, and try using, for instance, the "bold" button of the CKEditor.
You should notice the exception I mentionned above.
Tested using Rails 3.1.0.
Sad but true : CKEditor does not work in Rails 3 projects. It's kinda strange, but I'm no expert, so all I can tell is that if CKEditor effectivly seems to work anywhere else, it won't work with ANY Rails 3 project (I didn't tried without the jquery gem, but it's included by default so...).
Even in a completly naked Rails 3 project, and without using Rails automatic javascript compilation, it just won't work. What's up with that ?
Uncaught TypeError: Property 'focus' of object [object DOMWindow] is not a function e.extend.focus j.add.init.C.on.C.addMode.focus a.editor.focus a.command.exec e.extend.execCommand k.button.e.extend.click k.button.render.t.execute a.tools.addFunction a.tools.callFunction (anonymous function) onclick
HOW TO REPRODUCE :
-> Create a Rails project. There's no change to be made in the configuration (except maybe the routes).
-> Create a view with a div containing HTML.
-> Put the ckeditor source in /app/assets/javascript
-> Add this piece of Javascript in the view :
<script type="text/javascript">
$(document).ready(function() {
CKEDITOR.replace('the-id');
});
</script>Assuming the div you created has 'the-id' for id.
I assume you know how to render the view : just watch the result, open the console, and try using, for instance, the "bold" button of the CKEditor.
You should notice the exception I mentionned above.
Tested using Rails 3.1.0.

Re: CKEditor does not work with Rails 3
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!
Re: CKEditor does not work with Rails 3