开发者

NameError with RDiscount

开发者 https://www.devze.com 2023-02-08 11:42 出处:网络
I installed the RDiscount gem to my project. When I try to put the following in my application_helper.rb:

I installed the RDiscount gem to my project.

When I try to put the following in my application_helper.rb:

RDiscount.new(text).to_html  

I get

NameError:  
uninitialized constant ApplicationHelper::RDiscount

In the irb I can get RDiscount working after requiring it, but I can't get 开发者_运维技巧it to function anywhere in my project. What's wrong?


Have you put gem "rdiscount" in your Gemfile, updated and restarted your server? I got this error when I forgot to restart the server.

0

精彩评论

暂无评论...
验证码 换一张
取 消