Require command not working within bash irb on Snow Leopard

后端 未结 2 671
北恋
北恋 2021-01-12 08:00

I am working on Zed Shaw\'s Learn Ruby the Hard Way Exercise 25

http://ruby.learncodethehardway.org/ex25.html

When I navigate to the directory that holds the

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-12 08:58

    This is actually a mistake on my part when I was writing the exercise. @mischa is spot on with his solution, but you'll notice as you progress through the book that subsequent exercises use the require_relative command instead of require.

    The various methods for ensuring that your working directory is in the load path are described here, but I suggest you pick one and remain consistent.

提交回复
热议问题