在Ruby Gems和dugway安装中非常失落

在Ruby Gems和dugway安装中非常失落,ruby,gem,installation,bigcartel,Ruby,Gem,Installation,Bigcartel,我想使用Big Cartel所称的Ruby Gem在本地环境中创建主题,而不是在其实际平台上进行开发 我以前从未使用过Ruby或Gems,但据我所知,我需要先安装Ruby和DevKit。我下载并安装了Ruby 2.0.0-p247 x64和DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe,然后将DevKit解压缩到Ruby文件夹中 我按照说明做了,但为了把它放在一个地方,我还是要写下我到底做了什么 我用Ruby打开启动命令提示符,键入cd C:\Ruby

我想使用Big Cartel所称的Ruby Gem在本地环境中创建主题,而不是在其实际平台上进行开发

我以前从未使用过Ruby或Gems,但据我所知,我需要先安装Ruby和DevKit。我下载并安装了Ruby 2.0.0-p247 x64和DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe,然后将DevKit解压缩到Ruby文件夹中

我按照说明做了,但为了把它放在一个地方,我还是要写下我到底做了什么

我用Ruby打开启动命令提示符,键入cd C:\Ruby200-x64\devkit,然后键入Ruby dk.rb init,得到如下结果:

    Initialization complete! Please review and modify the auto-generated
    'config.yml' file to ensure it contains the root directories to all
    of the installed Rubies you want enhanced by the DevKit.
我看了一下这个文件,下面的注释是-C:/Ruby200-x64,我想这意味着因为我以前没有使用过任何东西,所以我没有任何东西可以修改

现在要安装,我键入ruby dk.rb install,结果显示:

    [INFO] Updating convenience notice gem override for 'C:/Ruby200-x64'
    [INFO] Installing 'C:/Ruby200-x64/lib/ruby/site_ruby/devkit.rb'
然后它告诉我进行测试安装,所以我键入gem install json-platform=ruby,这给了我以下信息:

    Fetching: json-1.8.0.gem (100%)
    Temporarily enhancing PATH to include DevKit..
    Building native extensions. This could take a while...
    Successfully installed json-1.8.0
    Parsing documentation for json-1.8.0
    Unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/json/ext/generator.so, skipping
    Unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/json/ext/parser.so, skipping
    Installing ri documentation for json-1.8.0
    1 gem installed
我在这里快速搜索了“无法转换”警告,并找到了让我感觉更好的警告,因为这不是一个错误,这意味着我继续输入ruby-rubygems-e require'json';放入JSON.load“[42]”。检查并显示[42],我认为这意味着它工作正常

现在,对于大型卡特尔Dugway gem,我键入gem install Dugway,这给了我一个错误:

    ERROR: While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: dugway requires i18n (= 0.6.1)
快速搜索显示i18n本身就是一颗宝石,所以。。。我刚刚学到的关于如何安装gems的假设使我认为gem install i18n应该写入命令提示符,谢天谢地,这安装没有警告或错误。因此,我尝试再次安装dugway gem install dugway,我得到了与之前完全相同的错误,dugway需要i18n

我现在很困惑,一个小时前我还不知道这意味着什么,我认为我到现在为止做得很好,但我仍在思考下一步该怎么做

我如何避免最后一个错误,对我来说,它已经安装好了,那么我做错了什么?很抱歉,如果这是显而易见的,但就像我说的,这对我来说是全新的,我已经习惯于编写PHP和运行数据库,所以我还在调整

编辑

要注意的是,我还尝试在gem install dugway的末尾添加-platform ruby,以防出现问题,但仍然出现相同的错误

编辑

遵循Simon Repp关于强制安装特定i18n版本的建议后:

ruby 2.0.0p247 (2013-06-27) [x64-mingw32]

C:\Users\Me>cd C:\Ruby200-x64\devkit

C:\Ruby200-x64\devkit>gem list i18n

*** LOCAL GEMS ***

i18n (0.6.4)

C:\Ruby200-x64\devkit>gem install i18n --version '= 0.6.1'
Fetching: i18n-0.6.1.gem (100%)
Successfully installed i18n-0.6.1
Parsing documentation for i18n-0.6.1
Installing ri documentation for i18n-0.6.1
1 gem installed
然后再次尝试安装dugway,直到最后一切都进展顺利:

C:\Ruby200-x64\devkit>gem install dugway
Fetching: bundler-1.3.5.gem (100%)
Successfully installed bundler-1.3.5
Fetching: rack-1.4.5.gem (100%)
Successfully installed rack-1.4.5
Fetching: rack-mount-0.8.3.gem (100%)
Successfully installed rack-mount-0.8.3
Fetching: activesupport-3.2.14.gem (100%)
Successfully installed activesupport-3.2.14
Fetching: liquid-2.4.1.gem (100%)
Successfully installed liquid-2.4.1
Fetching: coffee-script-source-1.6.3.gem (100%)
Successfully installed coffee-script-source-1.6.3
Fetching: execjs-1.4.0.gem (100%)
Successfully installed execjs-1.4.0
Fetching: coffee-script-2.2.0.gem (100%)
Successfully installed coffee-script-2.2.0
Fetching: sass-3.2.9.gem (100%)
Successfully installed sass-3.2.9
Fetching: hike-1.2.3.gem (100%)
Successfully installed hike-1.2.3
Fetching: tilt-1.4.1.gem (100%)
Successfully installed tilt-1.4.1
Fetching: sprockets-2.10.0.gem (100%)
Successfully installed sprockets-2.10.0
Fetching: sprockets-sass-0.9.1.gem (100%)
Successfully installed sprockets-sass-0.9.1
Fetching: chunky_png-1.2.8.gem (100%)
Successfully installed chunky_png-1.2.8
Fetching: fssm-0.2.10.gem (100%)
Successfully installed fssm-0.2.10
Fetching: compass-0.12.2.gem (100%)
Successfully installed compass-0.12.2
Fetching: multi_xml-0.5.4.gem (100%)
Successfully installed multi_xml-0.5.4
Fetching: httparty-0.10.2.gem (100%)
When you HTTParty, you must party hard!
Successfully installed httparty-0.10.2
Fetching: erubis-2.7.0.gem (100%)
Successfully installed erubis-2.7.0
Fetching: coderay-1.0.9.gem (100%)
Successfully installed coderay-1.0.9
Fetching: better_errors-0.6.0.gem (100%)
Successfully installed better_errors-0.6.0
Fetching: debug_inspector-0.0.2.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed debug_inspector-0.0.2
Fetching: binding_of_caller-0.7.2.gem (100%)
Building native extensions.  This could take a while...
Successfully installed binding_of_caller-0.7.2
Fetching: will_paginate-3.0.4.gem (100%)
Successfully installed will_paginate-3.0.4
Fetching: htmlentities-4.3.1.gem (100%)
Successfully installed htmlentities-4.3.1
Fetching: thor-0.17.0.gem (100%)
Successfully installed thor-0.17.0
Fetching: rubyzip-0.9.9.gem (100%)
Successfully installed rubyzip-0.9.9
Fetching: uglifier-1.3.0.gem (100%)
Successfully installed uglifier-1.3.0
Fetching: eventmachine-1.0.3.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing dugway:
        ERROR: Failed to build gem native extension.

C:/Ruby200-x64/bin/ruby.exe extconf.rb
checking for main() in -lssl... no
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... no
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for windows.h... yes
checking for winsock.h... yes
checking for main() in -lkernel32... yes
checking for main() in -lrpcrt4... yes
checking for main() in -lgdi32... yes
creating Makefile

make "DESTDIR="
generating rubyeventmachine-x64-mingw32.def
compiling binder.cpp
In file included from c:\ruby200-x64\devkit\mingw\bin\../lib/gcc/x86_64-w64-ming
w32/4.7.2/../../../../x86_64-w64-mingw32/include/process.h:12:0,
                 from c:/Ruby200-x64/include/ruby-2.0.0/ruby/win32.h:60,
                 from c:/Ruby200-x64/include/ruby-2.0.0/ruby/defines.h:153,
                 from c:/Ruby200-x64/include/ruby-2.0.0/ruby/ruby.h:70,
                 from c:/Ruby200-x64/include/ruby-2.0.0/ruby.h:33,
                 from em.h:24,
                 from project.h:150,
                 from binder.cpp:20:
c:\ruby200-x64\devkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../
x86_64-w64-mingw32/include/sys/types.h:68:16: error: conflicting declaration 'ty
pedef _pid_t pid_t'
In file included from binder.cpp:20:0:
project.h:97:13: error: 'pid_t' has a previous declaration as 'typedef int pid_t
'
In file included from project.h:151:0,
                 from binder.cpp:20:
ed.h: In member function 'void EventableDescriptor::SetSocketInvalid()':
ed.h:43:40: warning: overflow in implicit constant conversion [-Woverflow]
make: *** [binder.o] Error 1


Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/event
machine-1.0.3 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/ext
/gem_make.out

C:\Ruby200-x64\devkit>
使用gem list i18n,您可以获得所安装的i18n gem的版本信息。 应该在括号中,类似于i18n x.x.x

您安装的版本可能不是0.6.1,根据您的错误消息,0.6.1正是dugway工作所需的i18n版本

如果是这样,您可以尝试gem install i18n-version'=0.6.1'自行安装该特定版本

不幸的是,这很有可能失败,因为如果gem可以像那样为您安装,rubygems可能已经为您安装了。然而——无论你遇到什么样的错误,尝试这一点都会让你找到问题的深层原因,从而至少在你的道路上前进一步

使用gem list i18n,您可以获得所安装i18n gem的版本信息。 应该在括号中,类似于i18n x.x.x

您安装的版本可能不是0.6.1,根据您的错误消息,0.6.1正是dugway工作所需的i18n版本

如果是这样,您可以尝试gem install i18n-version'=0.6.1'自行安装该特定版本


不幸的是,这很有可能失败,因为如果gem可以像那样为您安装,rubygems可能已经为您安装了。然而——无论你遇到什么样的错误,尝试这一点都会让你找到问题的深层原因,从而至少在你的道路上前进一步

我通过卸载Ruby和DevKit的64位版本成功地让它工作

如果其他人想知道我是如何工作的,我完全删除了Ruby和DevKit,并下载了Ruby 2.0.0-p247和DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe

Ruby安装到C:\Ruby200\中,我将DevKit解压缩到C:\Ruby200\DevKit\

打开Ruby命令提示符并执行以下操作:

    Fetching: json-1.8.0.gem (100%)
    Temporarily enhancing PATH to include DevKit..
    Building native extensions. This could take a while...
    Successfully installed json-1.8.0
    Parsing documentation for json-1.8.0
    Unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/json/ext/generator.so, skipping
    Unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/json/ext/parser.so, skipping
    Installing ri documentation for json-1.8.0
    1 gem installed
更改路径,初始化,然后安装。通过安装json并再次发出有关ASCII到UTF-8转换的警告,按照他们在上所说的方式对其进行了测试,但没有出现错误

测试了json安装,然后安装了版本i18n 0.6.1,因为Dugway说这是它所需要的。试图安装Dugway,但它说activesupport需要i18n>=0.6.4,~>0,所以我安装了0.6.4的i18n,看看Dugway是否会安装

经过长时间的解析和安装等待,再次安装了Dugway 再次进行了两次ASCII到UTF-8的转换,但最终安装了Dugway

以下是我使用的命令列表,其中删除了所有结果以便于阅读:

C:\Users\Me> cd C:\Ruby200\devkit
C:\Ruby200\devkit> ruby dk.rb init
C:\Ruby200\devkit> ruby dk.rb install
C:\Ruby200\devkit> gem install json --platform=ruby
C:\Ruby200\devkit> ruby -rubygems -e "require 'json'; puts JSON.load('[42]').inspect
C:\Ruby200\devkit> gem install i18n --version '= 0.6.1'
C:\Ruby200\devkit> gem install i18n
C:\Ruby200\devkit> gem install dugway
希望这能帮助那些和我一样有问题的人,因为我对Ruby或Gems不太了解,就像我说的,我不知道64位版本的Ruby或Gems是否有问题,或者是dugways端的问题,但不管怎样,这对我来说都很有效


使用dugway本身仍然存在问题,但至少它已经安装,我将自己联系dugway,了解我现在面临的问题。

我通过卸载64位版本的Ruby和DevKit成功地使其工作

如果其他人想知道我是如何工作的,我完全删除了Ruby和DevKit,并下载了Ruby 2.0.0-p247和DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe

Ruby安装到C:\Ruby200\中,我将DevKit解压缩到C:\Ruby200\DevKit\

打开Ruby命令提示符并执行以下操作:

    Fetching: json-1.8.0.gem (100%)
    Temporarily enhancing PATH to include DevKit..
    Building native extensions. This could take a while...
    Successfully installed json-1.8.0
    Parsing documentation for json-1.8.0
    Unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/json/ext/generator.so, skipping
    Unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/json/ext/parser.so, skipping
    Installing ri documentation for json-1.8.0
    1 gem installed
更改路径,初始化,然后安装。通过安装json并再次发出有关ASCII到UTF-8转换的警告,按照他们在上所说的方式对其进行了测试,但没有出现错误

测试了json安装,然后安装了版本i18n 0.6.1,因为Dugway说这是它所需要的。试图安装Dugway,但它说activesupport需要i18n>=0.6.4,~>0,所以我安装了0.6.4的i18n,看看Dugway是否会安装

再次安装Dugway,在经过长时间的解析和再次安装更多ASCII到UTF-8转换之后,但Dugway终于安装了

以下是我使用的命令列表,其中删除了所有结果以便于阅读:

C:\Users\Me> cd C:\Ruby200\devkit
C:\Ruby200\devkit> ruby dk.rb init
C:\Ruby200\devkit> ruby dk.rb install
C:\Ruby200\devkit> gem install json --platform=ruby
C:\Ruby200\devkit> ruby -rubygems -e "require 'json'; puts JSON.load('[42]').inspect
C:\Ruby200\devkit> gem install i18n --version '= 0.6.1'
C:\Ruby200\devkit> gem install i18n
C:\Ruby200\devkit> gem install dugway
希望这能帮助那些和我一样有问题的人,因为我对Ruby或Gems不太了解,就像我说的,我不知道64位版本的Ruby或Gems是否有问题,或者是dugways端的问题,但不管怎样,这对我来说都很有效


使用dugway本身仍然存在问题,但至少它已经安装,我将自己联系dugway,了解我现在面临的问题。

好吧,比上次更进一步,非常感谢版本安装!我试图理解它抛出的错误,但运气不太好!用结果编辑了我的原始问题。好吧,它比上次更进一步了,非常感谢版本安装!我试图理解它抛出的错误,但运气不太好!用结果编辑了我的原始问题。如果您在使用ruby on wnidows时报告这些问题,那就太好了。不过,我发现有一点很重要,那就是ruby社区的大多数人更喜欢在*nix系统上工作,通常是linux或MacOS,作为初学者,在其中一个系统上使用ruby会更容易。如果您在使用ruby on wnidows时报告这些问题,那就太好了。不过,我发现有一点很重要,那就是ruby社区中的大多数人更喜欢在*nix系统上工作,通常是linux或MacOS,作为初学者,在其中一个系统上使用ruby会更容易。