ruby on rails - error when using rinku -
how can rinku run , page load properly?
error message: uninitialized constant actionview::compiledtemplates::rinku
steps taken:
- installed
rinku gem
,rake-compiler
, ran$ rake
per gem developer's instructions - inserted
require 'rinku'
controller file - inserted following view file
<% text = "go http://www.abc.com or email me @ dude@abc.com" %>
,<%= rinku.auto_link(text, mode=:all, link_attr=nil, skip_tags=nil) %>
the correct installation of rinku in rails 3.2 app is:
- add
gem 'rinku'
gemfile. bundle install
- restart rails server, if running.
don't add require 'rinku'
or bother rake
or rake-compiler
.
the rinku.auto_link(text)
should work in view. if html renders plain text, may need add raw
or html_safe
e.g.
<%= raw rinku.auto_link(text) %>
or <%= rinku.auto_link(text).html_safe %>
versions: rails 3.2.13, rinku 1.7.3
Comments
Post a Comment