KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
loadee.rb puts '> This is the second file.' loaddemo.rb puts 'This is the first (master) program file.' load 'loadee.rb' puts 'And back again to the first file.' When I run "ruby loaddemo.rb" , This works fine. Both files are in the same directory, and that's the directory I run from. But if I change the load to a require, and with or without the extension I get: <internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- loadee.rb (LoadError) from <internal:lib/rubygems/custom_require>:29:in `require' from loaddemo.rb:2:in `<main>' My question is of course, why isn't require working in this case? It should, right? Do load and require use different paths? Ruby version 1.9.2
Tags (comma-separated)
Save Edits
Cancel