hello
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 Stewart
···
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.
-------
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?
)
···
On Jan 1, 2008 10:24 AM, Junkone <junkone1@gmail.com> wrote:
hello
how do i create a irb like console for my ruby app. i am running on
windows fyi.
--
Michael Greenly
http://blog.michaelgreenly.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
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 <mgreenly@gmail.com> wrote:
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?
)On Jan 1, 2008 10:24 AM, Junkone <junkone1@gmail.com> wrote:
> hello
> how do i create a irb like console for my ruby app. i am running on
> windows fyi.
>
>--
Michael Greenly
http://blog.michaelgreenly.com
--
Giles Bowkett
Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com