I'm trying to add some Markdown styling to my Rails 3 blog application. This should be something simple, but I can't get it to work.
I have kramdown
in my Gemfile:
gem 'kramdown'
I ran bundle install
. I have an application helper called kramdown
module ApplicationHelper
def kramdown(text)
require 'kramdown'
return Kramdown::Document.new(text).to_html
end
end
And in my view script:
<%= kramdown(@post.body) %>
I'm getting the error message:
no such file to load -- kramdown
What am I doing wrong?