hello
how do i create a irb like console for my ruby app. i am running on
windows fyi.
On 1 Jan 2008, at 16:24, Junkone wrote:
how do i create a irb like console for my ruby app. i am running on
windows fyi.
Try Highline:
http://highline.rubyforge.org/
Regards,
Andy S.
exposed to the end user? or just for development use?
If it’s just development use you’re after simply require ‘your/lib’ and
go
to town? irb also loads .irbrc when it launches, first from the current
path then $HOME/.irbrc so you can create a .irbrc that
preloads/configures
the debugging environment for you.
I don’t have any experience embedding it ( I think that’s what you’re
after?
)
The easiest way to do it is just create a file for IRB to load which
contains everything you want it to have access to, then do
irb -r the_file.rb
and you’re good to go.
On 1/1/08, michael greenly [email protected] wrote:
On Jan 1, 2008 10:24 AM, Junkone [email protected] wrote:
http://blog.michaelgreenly.com
–
Giles B.
Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com
my hack that i use for quick debugging on my programs is
require ‘pp’
do some setup
$stdout.write("# “); $stdout.flush
while line = gets
pp eval(line)
$stdout.write(”\n# "); $stdout.flush
or
pp main_object.instance_eval(line)
end
problem is of course that you have to make all your commands one-liners,
but aside from that it works like a charm