I run this one gem with the command "foo <options>". I'd like to try
to run it off the foo.rb file so that I can debug it. However, when I
do "ruby path/to/foo.rb <options>" it doesn't behave in the same way
as "foo <options>". How do I need to run this program in order to
debug it?
maybe first
require 'rubygems'
then require the file,
maybe run it from within that directory.
maybe do Dir.chdir to it, first, then require.
eggman2001 wrote:
I run this one gem with the command "foo <options>". I'd like to try
to run it off the foo.rb file so that I can debug it. However, when I
do "ruby path/to/foo.rb <options>" it doesn't behave in the same way
as "foo <options>". How do I need to run this program in order to
debug it?
Specifics would be nice, as I don't quite understand what you're trying
to do. "run a gem"?
···
--
Posted via http://www.ruby-forum.com/\.
so I installed the gem rdig. You run rdig with "rdig <options>" and
I'd like to debug it.
···
On Oct 18, 9:53 am, Roger Pack <rogerpack2...@gmail.com> wrote:
maybe first
require 'rubygems'
then require the file,
maybe run it from within that directory.
maybe do Dir.chdir to it, first, then require.eggman2001 wrote:
> I run this one gem with the command "foo <options>". I'd like to try
> to run it off the foo.rb file so that I can debug it. However, when I
> do "ruby path/to/foo.rb <options>" it doesn't behave in the same way
> as "foo <options>". How do I need to run this program in order to
> debug it?Specifics would be nice, as I don't quite understand what you're trying
to do. "run a gem"?
--
Posted viahttp://www.ruby-forum.com/.
eggman2001 wrote:
so I installed the gem rdig. You run rdig with "rdig <options>" and
I'd like to debug it.
gem install ruby-debug
rdebug rdig (maybe)
gl
···
--
Posted via http://www.ruby-forum.com/\.
I tried that, but it doesn't work.
Here's the error that I'm getting...
C:\InstantRails\ruby_progs\rdig_testing>rdeb
s\rdig_testing\config.rb
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/
6:in `initialize': Bad file descriptor - con
from C:/InstantRails/ruby/lib/ruby/g
by-debug.rb:86:in `new'
from C:/InstantRails/ruby/lib/ruby/g
by-debug.rb:86:in `start_client'
from C:/InstantRails/ruby/lib/ruby/g
ebug:87
from C:/InstantRails/ruby/bin/rdebug
from C:/InstantRails/ruby/bin/rdebug
C:\InstantRails\ruby_progs\rdig_testing>
···
On Oct 19, 12:09 am, Roger Pack <rogerpack2...@gmail.com> wrote:
eggman2001 wrote:
> so I installed the gem rdig. You run rdig with "rdig <options>" and
> I'd like to debug it.gem install ruby-debug
rdebug rdig (maybe)
gl
--
Posted viahttp://www.ruby-forum.com/.
checkout the topmost file line.
Maybe you're trying to run something on a port in use?
eggman2001 wrote:
···
I tried that, but it doesn't work.
Here's the error that I'm getting...
C:\InstantRails\ruby_progs\rdig_testing>rdeb
s\rdig_testing\config.rb
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/
6:in `initialize': Bad file descriptor - con
from C:/InstantRails/ruby/lib/ruby/g
by-debug.rb:86:in `new'
from C:/InstantRails/ruby/lib/ruby/g
by-debug.rb:86:in `start_client'
from C:/InstantRails/ruby/lib/ruby/g
ebug:87
from C:/InstantRails/ruby/bin/rdebug
from C:/InstantRails/ruby/bin/rdebugC:\InstantRails\ruby_progs\rdig_testing>
--
Posted via http://www.ruby-forum.com/\.
Not quite sure what you mean - sorry. I know very little about the
role that ports play in these situations.
···
On Oct 19, 11:29 am, Roger Pack <rogerpack2...@gmail.com> wrote:
checkout the topmost file line.
Maybe you're trying to run something on a port in use?eggman2001 wrote:
> I tried that, but it doesn't work.> Here's the error that I'm getting...
> C:\InstantRails\ruby_progs\rdig_testing>rdeb
> s\rdig_testing\config.rb
> C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/
> 6:in `initialize': Bad file descriptor - con
> from C:/InstantRails/ruby/lib/ruby/g
> by-debug.rb:86:in `new'
> from C:/InstantRails/ruby/lib/ruby/g
> by-debug.rb:86:in `start_client'
> from C:/InstantRails/ruby/lib/ruby/g
> ebug:87
> from C:/InstantRails/ruby/bin/rdebug
> from C:/InstantRails/ruby/bin/rdebug> C:\InstantRails\ruby_progs\rdig_testing>
--
Posted viahttp://www.ruby-forum.com/.
eggman2001 wrote:
Not quite sure what you mean - sorry. I know very little about the
role that ports play in these situations.
go into the rdig file (find it), then add
require 'ruby-debug'
debugger
and it should open a breakpoint for you there (run it normal).
GL!
-Roger
···
--
Posted via http://www.ruby-forum.com/\.
That worked! Thanks so much
···
On Oct 20, 12:07 pm, Roger Pack <rogerpack2...@gmail.com> wrote:
eggman2001 wrote:
> Not quite sure what you mean - sorry. I know very little about the
> role that ports play in these situations.go into the rdig file (find it), then add
require 'ruby-debug'
debuggerand it should open a breakpoint for you there (run it normal).
GL!
-Roger
--
Posted viahttp://www.ruby-forum.com/.