Last active
September 3, 2023 15:44
-
-
Save cherryramatisdev/8e9766086263c653599e86cce3e527e4 to your computer and use it in GitHub Desktop.
A sample IRB configuration for ruby projects, save it in bin/console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # Ensure that the 'lib/' directory is in the load path | |
| $LOAD_PATH.unshift(File.expand_path('../lib', __dir__)) | |
| # Load all .rb files in the lib/ directory | |
| Dir[File.expand_path('../lib/*.rb', __dir__)].each { |file| require file } | |
| # Start an IRB session | |
| require 'irb' | |
| IRB.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment