使用软件包安装来安装Publify,在蓝色宝石上出现错误 [英] Installing Publify with bundle install, error on bluecloth gem

查看:188
本文介绍了使用软件包安装来安装Publify,在蓝色宝石上出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



每次尝试时,捆绑安装 Publify ,安装bluecloth gem时收到相同的错误信息:

  C:\ Users \Lunasea\Downloads\typo-6.0.9> gem install bluecloth 
临时增强PATH到包括DevKit ...
构建本机扩展。这可能需要一段时间...
错误:安装bluecloth时出错:
错误:无法构建gem本机扩展。

C:/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb
检查srand()...是
检查random()...没有
检查rand()...是
在string.h中检查bzero(),strings.h ...没有
检查strcasecmp()...是
检查strncasecmp()...是
检查mkdio.h ...是
检查ruby / encoding.h ...是
创建extconf.h
创建Makefile
$ b $ make make
C:/RailsInstaller/Ruby1.9.2/bin/ruby -eputs'EXPORTS','Init_bluecloth_ext'
> bluecloth_ext-i386-mingw32.def
gcc -I。 -IC:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/i386-mingw32 -I / C / Rails
Installer / Ruby1.9.2 / include / ruby​​-1.9.1 / ruby​​ / backward -I /C/RailsInstaller/Ruby1.9
.2 / include / ruby​​-1.9.1 -I。 -DRUBY_EXTCONF_H = \extconf.h\-DVERSION = \2.0.9\
-O3 -g -Wextra -Wno -unused-parameter -Wno-brackheses -Wpointer-arith -Wwrite -st
rings -Wno-missing-field-initializers -Wno-long-long -I。 -o bluecloth.o -c blue
cloth.c
从c:\railsinstaller\devkit\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ lib / gcc / mingw32 / 4.5中包含的文件中。
1 /../../../../include/windows.h:48:0,b $ b from c:\railsinstaller\devkit\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ./lib/gcc/mingw32/4.5。
1 /../../../../ include / winsock2.h:22,
from c:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/ruby/ Win32的。
h:33,
from c:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/ruby/define
sh:205,
from c:/ RailsInstaller / Ruby1.9.2 / include / ruby​​-1.9.1 / ruby​​ / ruby​​.h
:74,
来自c:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/ruby.h: 32,来自bluecloth.h的
:14,来自bluecloth.c的
:25:
c:\railsinstaller\devkit\mingw\bin\ ../ lib / gcc / mingw32 / 4.5.1 /../../../../include/
windef.h:229:23:error:duplicate'unsigned'
c:\railsinstaller\devkit\\ \\明明\ bin\ ../ lib / gcc / mingw32 / 4.5.1 /../../../../ include /
windef.h:238:23:error:duplicate'无符号'
c:\railsinstaller\devkit\mingw\bin\ ../ lib / gcc / mingw32 / 4.5.1 /../../../../include/
windef.h:238:23:错误:声明说明符中有两个或多个数据类型
c:\railsinstaller\devkit\mingw\bin\ ../ lib / gcc / mingw32 / 4.5。 1 /../../../../我nclude /
windef.h:241:24:错误:重复'unsigned'
make:*** [bluecloth.o]错误1


Gem文件将继续安装在C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9
.1 / gems / bluecloth-2.2.0中进行检查。
记录到C的结果:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bluecloth
-2.2.0 / ext / gem_make.out

我已经试着单独安装gem,或者只是安装最新版本,但总是给出相同的结果。



我使用标准生成的database.yml。

解决方案

头文件在2.2.0中防止在Windows上编译蓝布。但是,您可以自行修补它:


  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文件

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


  5. 打开此目录并安装补丁宝石:



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



I'm trying to install Publify web blog CMS 6.0.9 for Ruby on Rails 3.1 on Windows.

Every time I try to bundle install Publify, I get the same error message when installing the bluecloth gem:

C:\Users\Lunasea\Downloads\typo-6.0.9>gem install bluecloth
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing bluecloth:
        ERROR: Failed to build gem native extension.

        C:/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb
checking for srand()... yes
checking for random()... no
checking for rand()... yes
checking for bzero() in string.h,strings.h... no
checking for strcasecmp()... yes
checking for strncasecmp()... yes
checking for mkdio.h... yes
checking for ruby/encoding.h... yes
creating extconf.h
creating Makefile

make
C:/RailsInstaller/Ruby1.9.2/bin/ruby -e "puts 'EXPORTS', 'Init_bluecloth_ext'"
> bluecloth_ext-i386-mingw32.def
gcc -I. -IC:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/i386-mingw32 -I/C/Rails
Installer/Ruby1.9.2/include/ruby-1.9.1/ruby/backward -I/C/RailsInstaller/Ruby1.9
.2/include/ruby-1.9.1 -I. -DRUBY_EXTCONF_H=\"extconf.h\"    -DVERSION=\"2.0.9\"
-O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-st
rings -Wno-missing-field-initializers -Wno-long-long -I.  -o bluecloth.o -c blue
cloth.c
In file included from c:\railsinstaller\devkit\mingw\bin\../lib/gcc/mingw32/4.5.
1/../../../../include/windows.h:48:0,
                 from c:\railsinstaller\devkit\mingw\bin\../lib/gcc/mingw32/4.5.
1/../../../../include/winsock2.h:22,
                 from c:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/ruby/win32.
h:33,
                 from c:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/ruby/define
s.h:205,
                 from c:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/ruby/ruby.h
:74,
                 from c:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/ruby.h:32,
                 from bluecloth.h:14,
                 from bluecloth.c:25:
c:\railsinstaller\devkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/
windef.h:229:23: error: duplicate 'unsigned'
c:\railsinstaller\devkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/
windef.h:238:23: error: duplicate 'unsigned'
c:\railsinstaller\devkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/
windef.h:238:23: error: two or more data types in declaration specifiers
c:\railsinstaller\devkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/
windef.h:241:24: error: duplicate 'unsigned'
make: *** [bluecloth.o] Error 1


Gem files will remain installed in C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9
.1/gems/bluecloth-2.2.0 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bluecloth
-2.2.0/ext/gem_make.out

I already tried to install the gem alone or simply to install the latest version, but it gives always the same result.

I'm using the standard generated database.yml.

解决方案

The header files in 2.2.0 prevents bluecloth from compile on windows. However, you can patch it by yourself:

  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

这篇关于使用软件包安装来安装Publify,在蓝色宝石上出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆