views:

33

answers:

1

I want to convert markdown to html... in views i have: markdown(some_text_variable) but i got error that undefined method markdown i added require 'BlueCoth' to enviroment.rb and i installed BlueCloth gem, so dont voting me down but help

A: 

Try adding the following to your environment.rb instead of the require:

config.gem 'BlueCloth', :lib => 'bluecloth'

The gem is called BlueCloth, but the .rb file that gets required is all lowercase.

Make sure you restart rails after adding the config.gem line.

Aaron Hinni
I use rails 3 so config.gem doesn't work ;/