Created
June 28, 2011 19:10
-
-
Save dustbyrn/1051936 to your computer and use it in GitHub Desktop.
How to reload gems that you're working on
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
Givmo::Application.configure do | |
#... | |
# These 2 lines auto-reload couch_record | |
# This first line adds our gem's lib directory to the list of directories that will be searched | |
# when we encounter a missing constant | |
config.autoload_paths += %W(#{config.root}/../couch_record/lib) | |
# This line tells rails to unload the root constant (module/class) for our gem on every request | |
ActiveSupport::Dependencies.explicitly_unloadable_constants << 'CouchRecord' | |
end |
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 the gem from the local filesystem so we can work on it | |
gem 'couch_record', :path => '../couch_record' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!