当我将我的 rails 3.2.13 应用程序(在 Win XP 上)从 ruby 1.9.3 升级到 ruby 2.0.0 时,它因 gem RedCloth (4.2.9 x86-mingw32) 而崩溃。
消息:无法加载 2.0/redcloth_scan (LoadError)
。换句话说:/lib/2.0/redcloth_scan.so
在 gem 中不存在。
这个问题有什么解决办法吗?
(不幸的是,RedCloth 是唯一处理 Textile 的 Ruby 工具。)
最佳答案
你可以试试:
安装 RedCloth-4.2.9:
gem install RedCloth --platform==ruby -V
创建这个目录:
ruby\lib\ruby\gems\2.0.0\gems\RedCloth-4.2.9\ext\2.0
将所有文件复制到该目录:
ruby\lib\ruby\gems\2.0.0\gems\RedCloth-4.2.9\ext\redcloth_scan
然后您就可以在 Ruby 2.0 中使用 RedCloth。我尝试使用 jekyll 1.12.1,效果很好。
关于ruby-on-rails - 红布 2.0.0 [i386-mingw32] 上的 RedCloth 加载错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17682753/