The file welcome.rb contains:
welcome.rb
welcome_message = \"hi there\"
But in IRB, I can\'t access the variable I just created:
You can't access local variables defined in the included file. You can use ivars:
# in welcome.rb @welcome_message = 'hi there!' # and then, in irb: require 'welcome' puts @welcome_message #=>hi there!