本文介绍了无法在Windows Ruby 1.9.2上安装或更新Ruby bluecloth gem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

试图在Windows上更新我的bluecloth gem版本时收到错误消息。是否有需要为Windows安装的另一个版本,或者我可以使用的另一种蓝色布料?不幸的是,由于我使用的其他软件,我的开发环境严格为Windows,否则我会使用Linux环境。



以下是我得到的复制粘贴:


解决方案
2.2.0中的头文件可防止在Windows上编译bluecloth。但是,您可以自行修补它。正如Luis Lavena提到的那样,您需要应用该路径。


  1. 运行 gem install bluecloth -v' 2.2.0'如果您还没有

  2. 应用在 bluecloth.h 文件中,位于我的计算机上



    H:\Ruby193\lib\ruby\gems\1.9.1\gems\bluecloth-2.2.0\ext\bluecloth.h


  3. 转至Bluecloth 2.2.0目录,例如

    H:\Ruby193\lib\ruby\gems\1.9.1\gems\bluecloth-2.2.0


  4. 运行 rake gem (这可能需要安装一些额外的宝石)



    然后您应该看到在

    中创建的.gem文件
    $ b $ p $ H $ \Ruby193\lib\ruby\gems\1.9.1 \gems\bluecloth-2.2.0\pkg\bluecloth-2.2.0.gem


  5. 打开这个d irectory并安装修补后的gem:

    gem install bluecloth-2.2.0.gem --platform = ruby​​



I'm getting an error message while trying to update my version of bluecloth gem on Windows. Is there a different version that I need to install for Windows or an alternative to bluecloth that I can use? Unfortunately my development environment is strictly Windows due to other software I work with, otherwise I'd use a Linux environment.

Here's a copy paste of what I get:

解决方案

The header files in 2.2.0 prevents bluecloth from compile on windows. However, you can patch it by yourself. As Luis Lavena mentioned, you need to apply the path.

  1. Run gem install bluecloth -v '2.2.0' if you haven't already

  2. Apply this patch on bluecloth.h file, on my machine it is located in

    H:\Ruby193\lib\ruby\gems\1.9.1\gems\bluecloth-2.2.0\ext\bluecloth.h

  3. Go to bluecloth 2.2.0 directory, for example

    H:\Ruby193\lib\ruby\gems\1.9.1\gems\bluecloth-2.2.0

  4. Run rake gem (this may require to install some additional gems).

    Then you should see .gem file created in

    H:\Ruby193\lib\ruby\gems\1.9.1\gems\bluecloth-2.2.0\pkg\bluecloth-2.2.0.gem

  5. Open this directory and install the patched gem:

    gem install bluecloth-2.2.0.gem --platform=ruby

这篇关于无法在Windows Ruby 1.9.2上安装或更新Ruby bluecloth gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 18:12
查看更多