Simple Ruby how to get user to browse for a directory

I’m looking for a way for a user to “browse for directory”

box will appear, the user may select a folder and then it will save that
directory into a string


hi Christopher -

this will depend on the graphics toolkit you’re using. check out
Shoes - - it’s awesomely simple, and you can really
do quite a lot with it once you get into it.

to display a directory selection dialog in Shoes, you could just do
this: do
button(“open folder”){
selected_folder = ask_open_folder
p selected_folder if selected_folder

  • j