Welcome, Guest. Please login or register.
Kingdoms of Ahln
Pages: [1]
  Print  
Author Topic: Installation using Windows  (Read 706 times)
Mazir
Wanderer
*
Posts: 11


View Profile
« on: December 23, 2010, 03:40:07 pm »

I'm a programmer since 25 years, but this is the first time I try Ruby and of course I ran into problems Smiley

First of all I installed Ruby 1.9.2-p0 even though Kams states 1.9.1. Installation of Eventmachine failed of course, but I decided to check how far I get with Kams anyway. I got this:

D:\download\MUD\Ruby\kams-0.3.0\util>ruby setup.rb
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
util/config.rb (LoadError)
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from setup.rb:9:in `<main>'

Has this to do with 1.9.2 or is there something obvious I'm missing here?

UPDATE: 1.9.1 works so I guess I'll use that version Cheesy
« Last Edit: December 23, 2010, 03:57:14 pm by Mazir » Logged
Justin
Administrator
Citizen
*****
Posts: 189



View Profile
« Reply #1 on: December 23, 2010, 04:53:36 pm »

You will need eventmachine, for sure. I was able to install the latest beta version like this:

Code:
gem install eventmachine --pre

I believe the issue you are seeing is due to Ruby 1.9.2, though. They removed the current directory from the load path.

Did you get Kams from GitHub? I'll try to push out an update for this issue tonight.
Logged
Justin
Administrator
Citizen
*****
Posts: 189



View Profile
« Reply #2 on: December 24, 2010, 08:17:50 am »

Looks like there are more issues with 1.9.2...working on it Smiley

Edit: argh, windows problems now. Will have to fix later. Maybe it will work for you. It used to work on XP, having problems on Vista.
« Last Edit: December 24, 2010, 09:05:06 am by Justin » Logged
Mazir
Wanderer
*
Posts: 11


View Profile
« Reply #3 on: December 24, 2010, 03:36:42 pm »

It used to work on XP, having problems on Vista.

I have Vista. One of the things I had to do was to skip "module Guid_Unix_" in guid.rb. The blocks are:

-----------
if RUBY_PLATFORM =~ /win/i
   module Guid_Win32_
.
.
.
end

module Guid_Unix_
------------

I commented out the Guid_unix_ part, but should really be an "else" condition I believe.

Logged
Justin
Administrator
Citizen
*****
Posts: 189



View Profile
« Reply #4 on: December 24, 2010, 07:52:09 pm »

So...is it working for you?
Logged
Justin
Administrator
Citizen
*****
Posts: 189



View Profile
« Reply #5 on: December 25, 2010, 12:23:49 am »

Thanks for pointing that out. It looks like detection of the Windows platform wasn't working right, either.

Hopefully the issues are worked out now. It's working for me under XP, so I'm guessing Vista will be okay, too.
« Last Edit: December 25, 2010, 12:31:39 am by Justin » Logged
Mazir
Wanderer
*
Posts: 11


View Profile
« Reply #6 on: December 25, 2010, 04:26:31 pm »

So...is it working for you?

Probably. If I only could get past the Eventmachine installation. Haven't been able to get that working yet. Could you give me a quick how-to? I'm trying to get this working on my personal laptop and I got absolutely nothing in terms of programming on this. Just recently installed Ruby just to check Kams out Smiley Alot of "Trial and Error" here.
Logged
Justin
Administrator
Citizen
*****
Posts: 189



View Profile
« Reply #7 on: December 25, 2010, 06:54:22 pm »

Of course, I'm glad to help Smiley

What problem are you having? Did you try

Code:
gem install eventmachine --pre

? That worked for me.
« Last Edit: December 26, 2010, 08:00:05 pm by Justin » Logged
Mazir
Wanderer
*
Posts: 11


View Profile
« Reply #8 on: December 26, 2010, 06:23:43 pm »

I assume you mean "--pre". I sat down and did everything from start and installed Ruby 1.9.1 and the DevKit from http://rubyinstaller.org/downloads/ following the instructions at https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

I then did a "gem install eventmachine --pre" and the gem "eventmachine-1.0.0.beta.2-x86-mingw32" was installed.

I ran util\setup.rb

BUT when I try to start the server.rb I get a dialog from ruby saying it can't find the procedure start adress ruby_snprintf in the DLL file msvcrt-ruby191.dll

Closing that dialog I get:
----------
Unable to load the EventMachine C extension; To use the pure-ruby reactor, requi
re 'em/pure_ruby'
C:/Ruby191/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.2-x86-mingw32/lib/ru
byeventmachine.rb:2:in `require': 127: Det gÕr inte att hitta den angivna proced
uren.   - C:/Ruby191/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.2-x86-ming
w32/lib/1.9/rubyeventmachine.so (LoadError)
        from C:/Ruby191/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.2-x86-m
ingw32/lib/rubyeventmachine.rb:2:in `<top (required)>'
        from C:/Ruby191/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.2-x86-m
ingw32/lib/eventmachine.rb:8:in `require'
        from C:/Ruby191/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.2-x86-m
ingw32/lib/eventmachine.rb:8:in `<top (required)>'
        from server.rb:26:in `require'
        from server.rb:26:in `<main>'
--------

Next I will do everything from start again, but with 1.9.2

Hope this helps in tracking down what's wrong.
« Last Edit: December 27, 2010, 02:18:39 pm by Mazir » Logged
Justin
Administrator
Citizen
*****
Posts: 189



View Profile
« Reply #9 on: December 26, 2010, 06:58:49 pm »

Oh, yes, that is what I meant.

I tried everything with 1.9.2, and it seemed to be working. I didn't need the DevKit, actually. Your error seems to indicate that Eventmachine was compiled against a different DLL.

Sorry for the trouble. Hopefully 1.9.2 works for you. 1.9.2 is considered more stable than 1.9.1.
Logged
Mazir
Wanderer
*
Posts: 11


View Profile
« Reply #10 on: December 27, 2010, 02:47:31 pm »

How did you fix the "error" with current directory in load path with Ruby 1.9.2? Seems like it stops because of that.

<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
util/config (LoadError)
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from ./util/setup.rb:9:in `<main>'

UPDATE: Did a clone from Git Hub to get your latest changes and everything started ok Smiley
« Last Edit: December 27, 2010, 04:42:36 pm by Mazir » Logged
Justin
Administrator
Citizen
*****
Posts: 189



View Profile
« Reply #11 on: December 27, 2010, 05:49:13 pm »

Awesome!

Let me know if you have any other problems.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2006-2009, Simple Machines
Terra97 design by Bloc