DevKit installation failure on «ruby dk.rb init»

1,096 views
Skip to first unread message

Павел Радьков

unread,
Feb 6, 2012, 5:23:25 PM2/6/12
to rubyin...@googlegroups.com
Hello,
I have troubles with installation DevKit.
When I run «ruby dk.rb init» I've got an error:

c:\DevKit>ruby dk.rb init
[INFO] found RubyInstaller v1.9.3 at C:/Ruby193
C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:173:in `tr': invalid byte sequence in UTF-8 (ArgumentError)
        from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:173:in `initialize'
        from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:231:in `exception'
        from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:231:in `raise'
        from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:231:in `check'
        from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:277:in `EnumKey'
        from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:551:in `each_key'
        from dk.rb:119:in `block (2 levels) in scan_for'
        from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:389:in `open'
        from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:496:in `open'
        from dk.rb:118:in `block in scan_for'
        from dk.rb:116:in `each'
        from dk.rb:116:in `scan_for'
        from dk.rb:138:in `block in installed_rubies'
        from dk.rb:138:in `collect'
        from dk.rb:138:in `installed_rubies'
        from dk.rb:146:in `init'
        from dk.rb:313:in `run'
        from dk.rb:332:in `<main>'

The following line from registry.rb is :         super msg.tr("\r", '').chomp

My system: Win7 x64 RU. 
In user variables I have LANG=ru_RU.UTF-8 (maybe that matters)

Please help!

Luis Lavena

unread,
Feb 6, 2012, 5:30:01 PM2/6/12
to rubyin...@googlegroups.com
On Mon, Feb 6, 2012 at 7:23 PM, Павел Радьков <rad...@gmail.com> wrote:
> Hello,
> I have troubles with installation DevKit.
> When I run «ruby dk.rb init» I've got an error:
>
> c:\DevKit>ruby dk.rb init
> [INFO] found RubyInstaller v1.9.3 at C:/Ruby193
> C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:173:in `tr': invalid byte
> sequence in UTF-8 (ArgumentError)

What is your codepage?

(run chcp in cmd.exe)

Can you try adding the following line to the top of dk.rb?

# encoding: UTF-8

Save and try again?

>
> My system: Win7 x64 RU.
> In user variables I have LANG=ru_RU.UTF-8 (maybe that matters)
>

Definitely it could be.

Can you try setting a latin based codepage instead and execute again?

Seems to be a bug of dk.rb, so once we figure it out the details let's
open an issue on GitHub.

PS: Sorry took so long to notice your message, Google Groups didn't
email us (admins) about it.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Павел Радьков

unread,
Feb 6, 2012, 5:41:38 PM2/6/12
to rubyin...@googlegroups.com
Yeah, problem was in LANG variable.
I've deleted LANG, restart system and the rest of DevKit installation goes smooth.

Great thanks for response! 
Reply all
Reply to author
Forward
0 new messages