使用捆绑器从 github 安装 RedCloth gem

发布于 2024-11-28 14:17:09 字数 1103 浏览 6 评论 0原文

我在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一袭白衣梦中忆 2024-12-05 14:17:09

尝试运行“bundle config build.RedCloth --with-cflags=-w” &然后“捆绑安装”。

Try running "bundle config build.RedCloth --with-cflags=-w" & then "bundle install".

伏妖词 2024-12-05 14:17:09

这有点繁琐,但我能够使用以下命令在 mac os x Snow leopard 上获取 Gemfile 的 git 版本...

在您的项目中:

bundle install

您收到如下错误消息:

RedCloth at /Users/kunzmann/.rvm/gems/ruby-1.9.2-p290/bundler/gems/redcloth-9d6d28f93b02 did not have a valid gemspec.

然后,如果您有 Ragel,您可以执行此操作6.3 或更高版本(我使用了 brew install Ragel

cd /Users/kunzmann/.rvm/gems/ruby-1.9.2-p290/bundler/gems/redcloth-9d6d28f93b02
bundle install
bundle exec rake compile

下次在项目中捆绑安装时,您应该会看到:

Using RedCloth (4.2.7) from git://github.com/jgarber/redcloth.git (at master) with native extensions

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:

bundle install

You get the error message like:

RedCloth at /Users/kunzmann/.rvm/gems/ruby-1.9.2-p290/bundler/gems/redcloth-9d6d28f93b02 did not have a valid gemspec.

Then you can do this if you have Ragel 6.3 or greater (I used brew install Ragel)

cd /Users/kunzmann/.rvm/gems/ruby-1.9.2-p290/bundler/gems/redcloth-9d6d28f93b02
bundle install
bundle exec rake compile

The next time you bundle install in your project you should see:

Using RedCloth (4.2.7) from git://github.com/jgarber/redcloth.git (at master) with native extensions
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文