使用捆绑器从 github 安装 RedCloth gem
我在使用 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
: com/jgarber/redcloth/blob/master/redcloth.gemspec#L36" rel="nofollow">redcloth.gemspec 的这一行 试图包含源树中不存在的 3 个文件,其中是是什么导致了错误。
有人知道我这里发生了什么事吗?我一定是错过了一个步骤或者什么。 (我在 OS X 上使用 Rails 3.1 Edge。)
I'm running into a problem with the latest versioned release of the RedCloth gem, 4.2.7. Specifically, it's the gcc 4.6 compile issue that was resolved in this commit, but has not yet been included in a release despite how long ago it was committed.
In my Gemfile, I changed this:
gem 'RedCloth', '4.2.7'
to this:
gem 'RedCloth', :git => 'git://github.com/jgarber/redcloth.git'
However, when I run bundle install
, I end up getting a warning message that reads:
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
It looks like this line of the redcloth.gemspec is attempting to include 3 files that don't exist in the source tree, which is what's causing the error.
Anyone know what's going on here for me? I must be missing a step or something. (I'm on OS X using Rails 3.1 edge.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试运行“bundle config build.RedCloth --with-cflags=-w” &然后“捆绑安装”。
Try running "bundle config build.RedCloth --with-cflags=-w" & then "bundle install".
这有点繁琐,但我能够使用以下命令在 mac os x Snow leopard 上获取 Gemfile 的 git 版本...
在您的项目中:
您收到如下错误消息:
然后,如果您有 Ragel,您可以执行此操作6.3 或更高版本(我使用了
brew install Ragel
)下次在项目中
捆绑安装
时,您应该会看到:It's a bit fiddly, but I was able to get the git version of the Gemfile working on mac os x snow leopard with the following...
In your project:
You get the error message like:
Then you can do this if you have Ragel 6.3 or greater (I used
brew install Ragel
)The next time you
bundle install
in your project you should see: