Skip to content

Instantly share code, notes, and snippets.

@cherryramatisdev
Last active September 3, 2023 15:44
Show Gist options
  • Select an option

  • Save cherryramatisdev/8e9766086263c653599e86cce3e527e4 to your computer and use it in GitHub Desktop.

Select an option

Save cherryramatisdev/8e9766086263c653599e86cce3e527e4 to your computer and use it in GitHub Desktop.
A sample IRB configuration for ruby projects, save it in bin/console
#!/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