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:

  1. add gem 'rinku' gemfile.
  2. bundle install
  3. 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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -