-
-
Save ab5tract/58536 to your computer and use it in GitHub Desktop.
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
Stop putting "require 'rubygems'" in your project files. Just madly require | |
away, assuming that whatever you need will be found in the load path. | |
Install dollarspots.rb early in your loadpath. It checks the pwd for a file | |
named .dollarspots.rb and loads it if found. Use .dollarspots.rb files locally | |
in projects to jigger with your loadpath such that your reckless requires | |
actually work. Note that this may involve saying "require 'rubygems'". | |
Call ruby with -rdollarspots, or set "rdollarspots" as your RUBYOPT. To get TextMate's RubyMate facilities to work you'll need to edit the RUBYOPT shell variable in the Prefs. |
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
load("./.dollarspots.rb") if File.exist?("./.dollarspots.rb") | |
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
require 'fileutils' # because some people use dyspeptic operating systems | |
front = $:.first | |
FileUtils.cp "./dollarspots.rb", "#{front}/" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment