I follow this tutorial , but it continues to fail by saying "the undefined method is" new "to Redcarpet: Module." I have a redcarpet gem in my gemfile. A piece of code that doesn't work:
Redcarpet.new(@post.content).to_html
Well, it looks like Redcarpet 2 has completely changed the API. The following works:
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :autolink => true, :space_after_headers => true) raw markdown.render(@post_content.content)
Source: https://habr.com/ru/post/904547/More articles:viewDidAppear twice called iOS5 - iosHow to make a text field "first responder" in UIAlertView - iosGDAL JAVA package Binding and native library in SWT plugin - eclipseGit: change HEAD commit message without touching the index - gitSpring Bean Auto Connect Error - javaIs there a standard locale resolution algorithm? - language-agnosticElastic page search. Offset is ignored - pythonHow to enable an ad using XElement.ToString () - c #How to remove delay when repeating animation on Android? - androidJava isFile (), isDirectory () without checking for existence - javaAll Articles