No typos… does it have something to do with the reference to ubygems.
I haven’t played around with the installation files so I don’t
understand how a file could be mis-named, but who knows. And looking at
the folder shows both rubygems.rb and ubygems.rb.
Or is it referring to something else? I don’t get it. I’m working my
way through a beginners book but seem to be hung-up on this example.
No typos… does it have something to do with the reference to ubygems.
I haven’t played around with the installation files so I don’t
understand how a file could be mis-named, but who knows. And looking at
the folder shows both rubygems.rb and ubygems.rb.
Or is it referring to something else? I don’t get it. I’m working my
way through a beginners book but seem to be hung-up on this example.
Did you try looking at what’s inside ubygems.rb
This file allows for the running of rubygems with a nice
command line look-and-feel: ruby -rubygems foo.rb
#–
Copyright 2006 by Chad F., Rich Kilmer, Jim W. and others.
No typos… does it have something to do with the reference to ubygems.
I haven’t played around with the installation files so I don’t
understand how a file could be mis-named, but who knows. And looking at
the folder shows both rubygems.rb and ubygems.rb.
What’s happening is probably that you have RUBYOPT=-rubygems
which is a shortcut way to require rubygems, sometimes setup by the one
click installer. So when you ruby ruby -r debug some_file
it ends up running a require BEFORE it runs that file, and,
conveniently, brings you to a debug prompt in the pre-file file.
To get around it:
gem install ruby-debug
then within debugtest.rb
require ‘ruby-debug’
debugger
Cheers!
-r
What’s happening is probably that you have RUBYOPT=-rubygems
which is a shortcut way to require rubygems, sometimes setup by the one
click installer. So when you ruby ruby -r debug some_file
it ends up running a require BEFORE it runs that file, and,
conveniently, brings you to a debug prompt in the pre-file file.
To get around it:
gem install ruby-debug
then within debugtest.rb
require ‘ruby-debug’
debugger
Cheers!
-r
Thanks for the advice guys… RP I did what you suggested and it seemed
to work, although some of the commands don’t seem to work (following the
example in the book). But I was able to list and step through the
code… maybe a different version of ruby-debug from that used in the
book.
I’m moving on… I figure I can come back to this if it proves to be
important when I have some more knowledge. Thanks again for the help.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.