我跟着安装了RMagick for OSX: http ://rmagick.rubyforge.org/install-faq.html#osx
我已经完成了John Maddux的Imagemagick安装(在不使用MacPorts的情况下在OSX 上安装ImageMagick的解决方案)
这是我的终端窗口:
Suebphatt:~ suebphattleelertphong$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
Suebphatt:~ suebphattleelertphong$ rails -v
Rails 3.0.3
Suebphatt:~ suebphattleelertphong$ gem -v
1.3.7
Suebphatt:~ suebphattleelertphong$ gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed …Run Code Online (Sandbox Code Playgroud) 我提交了一个表单,在SQL数据库表中创建单行,作为博客条目:
<p>This is a paragraph.</p>
结果,当我通过Rails的ActiveRecord查询显示时,它呈现如下:
<p>This is a paragraph.</p>
这是代码,当我在浏览器中查看源代码时:
<p>This is a paragraph.</p>
我该如何解决这个问题?或者我只需要通过Javascript 转换<和>?
谢谢 :)