05 May, 2009, tphegley wrote in the 1st comment:
Votes: 0
I figured I would try ruby. I downloaded Zombie Craig's version of Teensy Mud and when I try to run it I get this:

*@*:~/znmud$ ./znmud.rb
./lib/network/protocol/mxpcodes.rb:5:in `require': no such file to load – gettext (LoadError)
from ./lib/network/protocol/mxpcodes.rb:5
from ./lib/network/protocol/mxpfilter.rb:9:in `require'
from ./lib/network/protocol/mxpfilter.rb:9
from ./lib/network/protocol/protocolstack.rb:21:in `require'
from ./lib/network/protocol/protocolstack.rb:21
from ./lib/network/connection.rb:20:in `require'
from ./lib/network/connection.rb:20
from ./lib/network/acceptor.rb:19:in `require'
from ./lib/network/acceptor.rb:19
from ./lib/network/reactor.rb:18:in `require'
from ./lib/network/reactor.rb:18
from ./lib/engine/engine.rb:20:in `require'
from ./lib/engine/engine.rb:20
from ./znmud.rb:23:in `require'
from ./znmud.rb:23


Here is mxpcodes.rb

# Filename: mxpelements.rb
# Author: Craig Smith
#

require 'gettext' <—5

I have gettext installed on my server, so I'm not sure what else to do with it.
05 May, 2009, Stormy wrote in the 2nd comment:
Votes: 0
If it's installed as a gem, did you already require rubygems?
05 May, 2009, tphegley wrote in the 3rd comment:
Votes: 0
I'm not really sure. I installed gettext itself and then later installed rubygems. Do I need to put require 'rubygems' above that gettext? I'm very new to ruby and not really sure syntax or how to get things going really.
05 May, 2009, Stormy wrote in the 4th comment:
Votes: 0
Installing gettext as a gem is probably the easiest route. You will need to require rubygems before requiring any gems, so just place it at the top of engine.rb.
05 May, 2009, tphegley wrote in the 5th comment:
Votes: 0
How do I install gettext as a gem? and putting:

require 'rubygems'

in engine.rb gave me this:
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load – gettext (LoadError)
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
from ./lib/network/protocol/mxpcodes.rb:5
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
from ./lib/network/protocol/mxpfilter.rb:9
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
from ./lib/network/protocol/protocolstack.rb:21
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
from ./lib/network/connection.rb:20
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
from ./lib/network/acceptor.rb:19
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
from ./lib/network/reactor.rb:18
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
from ./lib/engine/engine.rb:21
from ./znmud.rb:23:in `require'
from ./znmud.rb:23
05 May, 2009, Stormy wrote in the 6th comment:
Votes: 0
As the superuser, "gem install gettext"
05 May, 2009, tphegley wrote in the 7th comment:
Votes: 0
Ok, I did the gem install gettext and then added require 'rubygems' in engine.rb

When I ran the mud, it loaded, but on connection it had this error:

09-05-05 14:18:48 [ERROR] (Account) Caught NoMethodError: undefined method `collect' for nil:NilClass
/var/lib/gems/1.8/gems/locale-2.0.1/lib/locale.rb:205:in `collect_candidates'
/var/lib/gems/1.8/gems/locale-2.0.1/lib/locale.rb:194:in `candidates'
/var/lib/gems/1.8/gems/gettext-2.0.1/lib/gettext/textdomain_manager.rb:83:in `each_textdomains'
/var/lib/gems/1.8/gems/gettext-2.0.1/lib/gettext/textdomain_manager.rb:80:in `each'
/var/lib/gems/1.8/gems/gettext-2.0.1/lib/gettext/textdomain_manager.rb:80:in `each_textdomains'
/var/lib/gems/1.8/gems/gettext-2.0.1/lib/gettext/textdomain_manager.rb:104:in `translate_singluar_message'
/var/lib/gems/1.8/gems/gettext-2.0.1/lib/gettext.rb:131:in `_'


I'm going to try a regular version of teensy mud to see if I get the same errors.
05 May, 2009, Tyche wrote in the 8th comment:
Votes: 0
This is the first I've heard of this mud. I just downloaded it to take a look.
05 May, 2009, tphegley wrote in the 9th comment:
Votes: 0
I couldn't get teensymud to work so I believe (do to my newness to Ruby) it's on my end somewhere.

I have Ruby 1.8, Rubygems, Rake, Gettext, Log4r all on my server. I have gem install gettext and have put require 'rubygems' in engine.rb.


here is TeensyMuds output:

09-05-05 16:30:42 [ INFO] (YamlStore) Loading world…
09-05-05 16:30:42 [ INFO] (YamlStore) Database 'db/world.yaml' loaded…highest id = 1.
09-05-05 16:30:42 [ INFO] (Command) Loading commands…
09-05-05 16:30:42 [ INFO] (Command) Done.
09-05-05 16:30:42 [ INFO] (World) Starting Timer…
09-05-05 16:30:42 [ INFO] (World) World initialized.
09-05-05 16:30:42 [ INFO] (EventManager) Event manager starting…
09-05-05 16:30:42 [ INFO] (Engine) Booting server on port 3302
09-05-05 16:30:42 [FATAL] (Acceptor) Caught Errno::EINVAL: Invalid argument
./lib/network/acceptor.rb:39:in `setsockopt'
./lib/network/acceptor.rb:39:in `init'
./lib/network/reactor.rb:83:in `start'
./lib/engine/engine.rb:98:in `run'
./tmud.rb:87
09-05-05 16:30:42 [FATAL] (Engine) Engine failed in run
09-05-05 16:30:42 [FATAL] (Engine) Caught RuntimeError: Unable to start server
./lib/engine/engine.rb:98:in `run'
./tmud.rb:87
05 May, 2009, Tyche wrote in the 10th comment:
Votes: 0
The ONLY change needed to get TeensyMud to run is this…

Line 38 and 39 in ./lib/network/acceptor.rb should be changed to…
# @sock.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true)
@sock.setsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER, [0,0].pack('ii'))

The only requirements are that you are on a 1.8 version of ruby and have Log4r gem installed.
05 May, 2009, tphegley wrote in the 11th comment:
Votes: 0
Ok, got TeensyMud running with that change. Were you able to get ZNMud working corrently?
06 May, 2009, Stormy wrote in the 12th comment:
Votes: 0
ZNMud booted and seems to be working fine for me, after I required rubygems.
06 May, 2009, tphegley wrote in the 13th comment:
Votes: 0
Did you install gettext as a gem? or did it just work?
06 May, 2009, Stormy wrote in the 14th comment:
Votes: 0
I installed gettext and the locale dependency as gems.
06 May, 2009, tphegley wrote in the 15th comment:
Votes: 0
Hmm..Wonder what I am doing wrong here. I'll take a look at it again.
06 May, 2009, Stormy wrote in the 16th comment:
Votes: 0
New versions of gettext and locale were released today – try updating to see if that fixes your problem.
06 May, 2009, tphegley wrote in the 17th comment:
Votes: 0
It said I had the newest version of gettext.
06 May, 2009, tphegley wrote in the 18th comment:
Votes: 0
Ok. I jsut did gem install locale and that seemed to have fixed it. For now it is running and letting me log in.

Thanks for the help Stormy and Tyche.
0.0/18