我遇到了RedCloth gem的最新版本4.2.7的问题。具体地说,这是this commit中解决的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的this line试图包含源码树中不存在的3个文件,这就是导致错误的原因。
有人知道我这是怎么回事吗?我一定是漏掉了一步或什么。(我使用的是OS系统,使用的是Rails 3.1 edge。)
发布于 2011-08-09 09:58:23
这有点麻烦,但我能够让git版本的Gemfile在mac os x雪豹上运行,如下所示。
在您的项目中:
bundle install您会得到如下错误消息:
RedCloth at /Users/kunzmann/.rvm/gems/ruby-1.9.2-p290/bundler/gems/redcloth-9d6d28f93b02 did not have a valid gemspec.如果你使用的是Ragel6.3或更高版本(我用的是brew install Ragel),就可以这么做。
cd /Users/kunzmann/.rvm/gems/ruby-1.9.2-p290/bundler/gems/redcloth-9d6d28f93b02
bundle install
bundle exec rake compile下次在项目中使用bundle install时,您应该会看到:
Using RedCloth (4.2.7) from git://github.com/jgarber/redcloth.git (at master) with native extensions发布于 2012-05-08 12:59:56
尝试运行"bundle config build.RedCloth --with-cflag=-w“&然后运行"bundle install”。
https://stackoverflow.com/questions/6982997
复制相似问题