You can also execute system commands from within irb using "system"
system( "mkdir lesson2" )
or backticks
`mkdir lesson2`
Although in the case of "mkdir" you'll probably want to use "Dir.pwd" to
check you're in the right directory, and "Dir.chdir('c:/myfolder')" to
move to the correct folder fi
Hi there,
The problem is that you're trying to run a command that's not a part of
Ruby, but just part of the basic command tools Windows provides. When
you type "mkdir lesson2", you're giving the command to create a folder
named "lesson2", however, like I said, this is not part of Ruby and IRB.
2 matches
Mail list logo