Can't get this simple ruby example program to run????

Hi,

I'm running Window7-64, Ruby Mine 6.3.3, ruby 2-64 and I'm trying to run the following example from Sam's "Ruby in 21 days" byMark Slagel 

def simple_listing(directory)

  puts 'dir =' + directory.to_s

  filenames=Dir.new(directory).entries

  filenames.each do |base|

    fullname= directory + '/' + base

    if File.directory(fullname)

       printf "%30s/\n", base

    Else

    printf "%30s/\n", base,file.size(fullname)

    end

  end

end


simple_listing('.')

simple_listing('d:\rubytest')

When run, I get the following  errors:
===
P:\Ruby200-x64\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) P:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ruby-debug-ide-0.4.23.beta1/bin/rdebug-ide --debug --disable-int-handler --port 53328 --dispatcher-port 53329 -- C:/Users/Chuck/RubymineProjects/cbFiles/dir02.rb
P:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- debase_internals (LoadError)
from P:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from P:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/debase-0.0.9/lib/debase.rb:4:in `<top (required)>'
from P:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from P:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from P:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ruby-debug-ide-0.4.23.beta1/lib/ruby-debug-ide.rb:8:in `<top (required)>'
from P:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ruby-debug-ide-0.4.23.beta1/bin/rdebug-ide:8:in `require_relative'
from P:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ruby-debug-ide-0.4.23.beta1/bin/rdebug-ide:8:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'

Process finished with exit code 1
===


Can anyone see what's wrong???

Thanks,
Chuck

1 comment
Comment actions Permalink

Hi,

it looks like debase gem has not been installed correctly :(
Could you please try to reinstall it manually in concole?

Regards, Oleg.

0

Please sign in to leave a comment.