-
-
Save maiha/355268 to your computer and use it in GitHub Desktop.
| % echo $PATH | |
| /data/apps/maglev/bin:/home/maiha/bin:/usr/local/bin:/usr/bin:/bin | |
| % echo $MAGLEV_HOME | |
| /data/apps/maglev | |
| % cd $MAGLEV_HOME | |
| /data/apps/maglev% rake maglev:start | |
| startstone[Info]: Starting Stone repository monitor "maglev". | |
| startstone[Info]: GemStone server 'maglev' has been started. | |
| /data/apps/maglev% maglev -v | |
| maglev 0.7 (ruby 1.8.7) (2010-03-22 rev 23101-1134) [Linux x86_64] | |
| /data/apps/maglev% maglev-ruby -e 'p RUBY_DESCRIPTION' | |
| "ruby 1.8.7 (maglev patchlevel 249)" | |
| /data/apps/maglev% maglev-irb | |
| error , Expected nil to be a Boolean., | |
| during /data/apps/maglev/bin/maglev-irb | |
| ERROR 2085, Expected nil to be a Boolean. (RuntimeError) | |
| /data/apps/maglev% maglev-irb -f | |
| error , Expected nil to be a Boolean., | |
| during /data/apps/maglev/bin/maglev-irb | |
| ERROR 2085, Expected nil to be a Boolean. (RuntimeError) | |
| /data/apps/maglev% uname -a | |
| Linux mayuyu 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC 2010 x86_64 GNU/Linux | |
| /data/apps/maglev% cat ~/.irbrc | |
| cat: /home/maiha/.irbrc: No such file or directory |
I found that our differences is LANG. It runs fine in "LANG=C".
% LANG=C maglev-irb
irb(main):001:0>
% LANG=ja_JP.UTF-8 maglev-irb
#<RuntimeError: Expected nil to be a Boolean.>
/data/apps/maglev/lib/ruby/1.8/irb/locale.rb:44:in `String'
This error message is printed not on ver.23101 but on 23171, thanks.
The point is that string convertion magic is called from "lib/ruby/1.8/irb/locale.rb" only when LANG contains 'ja'. Then it needs Kconv library but it's not implemented yet. So I can start maglev-irb by one of the following.
-
call with LANG=C like above
-
fix irb/locale.rb to bypass the convertion (I prefer this because the magic is optional)
% git diff --- a/lib/ruby/1.8/irb/locale.rb +++ b/lib/ruby/1.8/irb/locale.rb @@ -41,7 +41,8 @@ module IRB mes = super(mes) case @lang when /^ja/ - mes = Kconv::kconv(mes, lc2kconv(@lang)) + # mes = Kconv::kconv(mes, lc2kconv(@lang)) + mes else mes end
Well, I found that current maglev implementation lacks error handling about autoload on this issue. In short, it should check the const is defined correctly or not after autoload is processed. Let's image empty file 'foo.rb' like kconv.rb.
% cat foo.rb
# (empty file)
# [matz-ruby]
% ruby -e "autoload(:Foo,'foo'); Foo"
-e:1: uninitialized constant Foo (NameError)
# [maglev]
% maglev-ruby -e "autoload(:Foo,'foo'); Foo"
ERROR 2085, Expected nil to be a Boolean. (RuntimeError)
I believe that adding this specification makes maglev nicer.
I've been trying to duplicate your problem without success. There must be some difference that accounts for your problem. You have a later version of Ubuntu (or at least a later kernel) but I hope that's not the problem.
It's possible you have a version mismatch. Did you install from github? If so, you could try "git pull; ./update.sh" which will update you to MagLev-23171 so you might want to "git clone" to a new directory instead.
monty@congo:MagLev-23101.Linux-x86_64 $ head version.txt gemstone/version.txt
==> version.txt <==
maglev 0.7 (ruby 1.8.7) (2010-03-22 rev 23101-1134) [x86_64-linux]
GEMSTONE: 3.0.0 Build: 64bit-23101
MONTICELLO: MagLev-ao.1134.mcz
MAGLEV: commit 6b2be71993e9936cda98d7ddb3fbc35cf7f1ca64
Author: Monty Williams [email protected]
Date: Mon Mar 22 15:23:11 2010 -0700
==> gemstone/version.txt <==
GemStone/S 64 Bit
3.0.0 Build: 64bit-23101
Mon Mar 22 15:37:21 2010
monty@congo:~ $ echo $PATH
/congo1/users/monty/MagLev/MagLev-23101.Linux-x86_64/bin:/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin
monty@congo:~ $ echo $MAGLEV_HOME
/congo1/users/monty/MagLev/MagLev-23101.Linux-x86_64
monty@congo:~ $ cd $MAGLEV_HOME
monty@congo:MagLev-23101.Linux-x86_64 $ rake maglev:start
(in /congo1/users/monty/MagLev/MagLev-23101.Linux-x86_64)
startstone[Info]: Starting Stone repository monitor "maglev".
startstone[Info]: GemStone server 'maglev' has been started.
monty@congo:MagLev-23101.Linux-x86_64 $ maglev -v
maglev 0.7 (ruby 1.8.7) (2010-03-22 rev 23101-1134) [Linux x86_64]
monty@congo:MagLev-23101.Linux-x86_64 $ maglev-ruby -e 'p RUBY_DESCRIPTION'
"ruby 1.8.7 (maglev patchlevel 249)"
monty@congo:MagLev-23101.Linux-x86_64 $ maglev-irb
error , no such file to load -- readline,
during /congo1/users/monty/MagLev/MagLev-23101.Linux-x86_64/lib/ruby/1.8/irb/completion.rb
monty@congo:MagLev-23101.Linux-x86_64 $ maglev-irb -f
irb(main):001:0> puts 3 + 4
7
=> nil
irb(main):002:0> exit
monty@congo:MagLev-23101.Linux-x86_64 $ uname -a
Linux congo 2.6.28-16-generic #55-Ubuntu SMP Tue Oct 20 19:48:32 UTC 2009 x86_64 GNU/Linux
monty@congo:MagLev-23101.Linux-x86_64 $ ls -l ~/.irbrc
-rw-r--r-- 1 monty users 208 2009-11-25 08:31 /home/monty/.irbrc
monty@congo:MagLev-23101.Linux-x86_64 $ cat !$
cat ~/.irbrc
Colorize results
begin
require 'rubygems'
require 'wirble'
Wirble.init
Wirble.colorize
rescue LoadError
puts "Error loading Wirble. Run 'sudo gem install wirble' to enable colorized results."
end