我在使用 RedCloth gem 的最新版本 4.2.7 时遇到问题。具体来说,这是在此提交中解决的 gcc 4.6 编译问题,但尚未包含在发布中,尽管它是在很久以前提交的。
在我的 Gemfile 中,我改变了这个:
gem 'RedCloth', '4.2.7'
对此:
gem 'RedCloth', :git => 'git://github.com/jgarber/redcloth.git'
但是,当我运行时bundle install
,我最终会收到一条警告消息,内容如下:
RedCloth at /Users/mhuggins/.rvm/gems/ruby-1.9.2-p180@myapp/bundler/gems/redcloth-9d6d28f93b02 did not have a valid gemspec.
This prevents bundler from installing bins or native extensions, but that may not affect its functionality.
The validation message from Rubygems was:
["ext/redcloth_scan/redcloth_attributes.c", "ext/redcloth_scan/redcloth_inline.c", "ext/redcloth_scan/redcloth_scan.c"] are not files
看起来redcloth.gemspec 的这一行试图包含 3 个在源代码树中不存在的文件,这就是导致错误的原因。
有人知道我这里发生了什么吗?我一定是错过了一个步骤或什么的。(我在 OS X 上使用 Rails 3.1 edge。)