Question

I want to use a Ruby Gem called Dugway by Big Cartel to create themes in a local environment rather than on their actual platform for development purposes.

I've never used Ruby or Gems before, but to my understanding I needed to first install Ruby and a DevKit. I downloaded and installed Ruby 2.0.0-p247 (x64) and DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe, then extracted the DevKit into the Ruby folder.

I followed the instructions here, but just to keep it all in one place I'll write exactly what I did anyway...

I opened Start Command Prompt With Ruby and typed cd C:\Ruby200-x64\devkit and then ruby dk.rb init and got this:

    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.

I had a look at the file and below the comment it has - C:/Ruby200-x64 which I assume means since I haven't used anything before, there's nothing for me to modify anyway.

Now to install, I typed ruby dk.rb install and I was shown:

    [INFO] Updating convenience notice gem override for 'C:/Ruby200-x64'
    [INFO] Installing 'C:/Ruby200-x64/lib/ruby/site_ruby/devkit.rb'

It then told me to do a test install so I typed gem install json --platform=ruby which gave me the following:

    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

I did a quick search on here about the unable to convert warnings, and found this which made me feel better since it's not an error, which meant I carried on and typed ruby -rubygems -e "require 'json'; puts JSON.load('[42]').inspect" and it displayed [42] which I assumed meant it worked correctly!

So now on with Big Cartels Dugway gem, I type gem install dugway which gave me the error:

    ERROR: While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: dugway requires i18n (= 0.6.1)

Quick search showed me i18n is a gem itself, so... assumptions of what I'd just learnt on how to install gems made me think gem install i18n should be written into the command prompt, this installed no warnings or errors thankfully. So I tried to install dugway again gem install dugway and I got exactly the same error as before, that dugway requires i18n.

I'm pretty confused now, to say an hour ago I didn't have a clue what any of this meant, I thought I had done well up until now, but I'm stuck on what to do next.

How do I get around that last error, to me it's installed so what am I doing wrong? Sorry if it's obvious, but like I said, this is all pretty new to me, I'm used to just writing PHP and running databases so I'm still adjusting!

EDIT

To note, I've also tried adding --platform-ruby at the end of gem install dugway just in case that was a problem, but still got the same error.

EDIT

After following Simon Repp's advice of forcing the specific i18n version to install:

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

Then tried installing dugway again, everything was going well until the end:

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>
Was it helpful?

Solution

I've managed to get it working by uninstalling 64 bit versions of both Ruby and the DevKit.

In case anyone else wants to know how I got it working, I removed Ruby and the DevKit completely and downloaded both Ruby 2.0.0-p247 and DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe.

Ruby installs into C:\Ruby200\ and I extracted the DevKit to C:\Ruby200\devkit\.

Opened Ruby Command Prompt and did the following:

Change path, initialize and then install. Tested it like they says on the RubyInstall DevKit by installing json (couple of warnings again about ASCII to UTF-8 conversions but no errors).

Tested the json install and then installed version i18n 0.6.1 as that is what Dugway says it requires. Tried to install Dugway but it says that activesupport requires i18n (>= 0.6.4, ~> 0., so I installed 0.6.4 of i18n to see if Dugway would install then.

Installed Dugway again, after a long wait of parsing and installing a couple more ASCII to UTF-8 conversions again but Dugway was finally installed!

Here's the list of commands I used with all the results removed for easy reading:

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

Hopefully that helps people who have any troubles the same as me, since I don't know much about Ruby or Gems like I said, I don't know if it's something wrong with either of them with the 64bit versions or if it's on dugways end, but either way, this worked for me!

There's still problems with using dugway itself, but at least it's installed, I'll be contacting dugway themselves on the issues I'm facing now.

OTHER TIPS

With gem list i18n you can get the version information for the i18n gem you installed.
(Should be in parentheses, something like i18n (x.x.x))

Chances are that the version you have installed is not 0.6.1 (which, according to your error message is the exact version of i18n that dugway requires to work)

If so you can try gem install i18n --version '= 0.6.1' to install that specific version yourself.

There's unfortunately a good chance that this will fail, because if the gem was installable for you just like that, rubygems would probably already have done it for you. However - Whatever error you receive trying this, will lead you to the deeper cause of the problem, and thus at least one step further on your way ;)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top