简体   繁体   中英

How to load a ruby script in IRB?

I typed a ruby script in Notepad++, and got the output in command-prompt. But when I tried to load the script using the command- load "route.rb" in IRB, it flashed the below error.

My Scripts are located in C:/Ruby21-x64/Ruby

Cannot load such file-- route.rb
from (irb):4:in 'load'
from (irb):4
from C:/Ruby21-x64/bin/irb:11:in '<main>'

Make sure to cd into the directory where your module resides. Otherwise the module you are trying to load will be unavailable to the irb session.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM