Text Filters - require statement - Rails 2.3.2

8 views
Skip to first unread message

bilson

unread,
Apr 27, 2009, 7:26:46 PM4/27/09
to Comatose Plugin
I am having difficulty including additional text filters in Rails
2.3.2 because the require statement does not seem to be finding the
required files.

The following works fine in my environment...

TextFilters.define :myfilter, "My Filter" do
def render_text(text)
text.gsub("\n", '--------')
end
end

This does not work...

TextFilters.define :myfilter, "My Filter" do
require 'bluecloth' # requiring BlueCloth
def render_text(text)
text.gsub("\n", '--------')
end
end

Additionally, the Markdown setup as a default is not requiring
"bluecloth". I have bluecloth installed and can access it in an irb
session with...
require 'rubygems'
require 'bluecloth'

I have also attemped to explicitly require "rubygems" within my
TextFilter declaration.

I have tried additional parsers such as Maruku and run into the same
issue.

Any ideas?

Best Regards,
David Baldwin

bilson

unread,
Apr 27, 2009, 7:56:04 PM4/27/09
to Comatose Plugin
Okay. Figured out the issue.

rake gems:unpack:dependencies
rake gems:build

Markdown has an additional build step that I missed.

Comatose is great!

Best Regards,
David Bladwin
Reply all
Reply to author
Forward
0 new messages