From: Ruby Mode Date: 2006-03-12T11:39:34+09:00 Subject: Re: Calling plotutils from xemacs using Ruby GSL ------=_Part_6425_11544989.1142131158118 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks Axel: This was my output, leaving me to believe I have bigger problems, or I'm just using IRB incorrectly: Why would it see GSL okay but barf on the include for GSL::Random? Thanks for your time. #!/usr/local/bin/ruby require "GSL" true include GSL::Random NameError: uninitialized constant GSL::Random from (irb):5 # Test random number distributions # generate output suitable for graph(1) from GNU plotutils: # ruby test/rnd3.rb | graph -Tps > g.ps STDERR.puts "Running tests for RND(3)..." Running tests for RND(3)... nil x =3D y =3D 0 0 a =3D [] [] r =3D RNG.new NameError: uninitialized constant RNG from (irb):15 puts "#m=3D1,S=3D2" #m=3D1,S=3D2 nil printf "%g %g\n", x, y 0 0 nil 10.times do a =3D RND::dir_2d(r) x +=3D a[0] y +=3D a[1] printf "%g %g\n", x, y end NameError: uninitialized constant RND from (irb):19 from (irb):18 STDERR.puts "\ndone.SyntaxError: compile error (irb):25: unterminated string meets end of file from (irb):25 On 3/11/06, Nuralanur@aol.com wrote: > > Just guessing ... > Maybe plotutils cannot be found because its path is not visible ? > What happens if you run the example from > > _http://ruby-gsl.sourceforge.net/rnd3.html_ > (http://ruby-gsl.sourceforge.net/rnd3.html) . > > If that works out ok, you could execute the graph command > as an external command, eg. by including it in backticks or > by calling the system command ... > > Best regards, > > Axel > > ------=_Part_6425_11544989.1142131158118--