Created
November 29, 2010 11:25
-
-
Save code-later/719848 to your computer and use it in GitHub Desktop.
Load a project specific .irbrc in your Rails 3 project
This file contains 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
# Add this method the MyApp::Application class (in config/application.rb) | |
def load_console(sandbox=false) | |
super | |
project_specific_irbrc = File.join(Rails.root, ".irbrc") | |
puts "Loading project specific .irbrc ..." | |
load(project_specific_irbrc) if File.exists?(project_specific_irbrc) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Holy shit I worship these hacks.
Trying to get my irbrc file to load inside a container without molesting the Dockerfile.... glarrrg
Thanks :-)