Results 1 to 6 of 6
Thread: Rubygems and paths
Mar 13, 2006, 08:47 #1
- Join Date
- Mar 2006
- 0 Post(s)
- 0 Thread(s)
Rubygems and paths
I have installed the latest version of rubygems as root on an old Sun UltraSparc 2 running Solaris 8. I have successfully installed the latest progressbar gem as root. I have tried to implement a simple test of progressbar in the following script:
bar = ProgressBar.new("Example progress", 50)
total = 0
until total >= 50
...increment = rand(6) + 3)
...total += increment
Of course, I do not have leading periods in my script, but when I previewed this message it failed to indent those four lines, so I tried this as an aid to clarity.
I have tried preceding the existing require line with require 'rubygems'. I have tried removing the #!/usr/local/bin/ruby and running ruby -rubygems progressbar. I have tried, as a c shell user, setenv RUBYOPT rubygems. In every case I get the identical response:
./progressbar.rb:9: unitialized constant ProgressBar (NameError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
I added the $: block in an attempt to trace my paths, but this shed no light, at least for me. Can someone explain what i am doing wrong?
Thanks in advance - GGB