Get Ckeditor Setup

I'm just gonna work through getting ckeditor setup with Rails 3.1

The original setup process is at: here. It looks not too complicated, but it involves getting asset pipeline setup and everything. It could get into issues depending on which version of Rails you have. But to set up ckeditor by itself is simpler than that. It doesn't have to go to asset pipeline at all!

First, put it in Gemfile

gem 'ckeditor'

Run

bundle install

Then download ckeditor package from their website and put it under public/javascripts folder.

Modify your view template, add these lines:

<script type="text/javascript">
var CKEDITOR_BASEPATH = '../javascripts/ckeditor/';
</script>
<%= javascript_include_tag "application" %>
<%= javascript_include_tag "ckeditor/ckeditor" %>

And,

<div id='comments' class='outerDiv'>
                <%= note.cktext_area :comments, :toolbar=>'Full' %>
</div>

Now, if you open your view template in browser, you would see the rich text editor and all.
Once you're done with editing and save to db, you will be able to see the html content via

<%=raw(c.comments)%>

Wala! You're done!