question about html-pipeline

gem "html-pipeline", require: "html/pipeline"

Don't place it in a group, place it at the bottom of the file so that
rails will Bundler.require it by default. After you do that bundle
and then it *should* work if it doesn't there needs to be an actual
error (trace) sent.

thanks for you answer, it already out of any group, and I place it at the bottom still get error, maybe problem is not in installation (rails c can work) I place this code in my comment model (app/models/comment.rb)

def markdown

#require “html/pipeline”

filter =“Hi world!”)



I got NameError - uninitialized constant HTML::Pipeline:

if I uncomment require line I got LoadError - cannot load such file – html/pipeline:

I know I must make some stupid mistake, but just don’t know it

Try moving the require line off to a file that runs once at application startup, maybe /config/application.rb. Watch your console as the application starts, and see what you see then. The error acts like the gem never loaded, so maybe requiring it that late (just before you need it) is the issue.


thanks all you help

the problem is that I need to restart my rails server :stuck_out_tongue:

thanks, merry christmas