Skip to content

Instantly share code, notes, and snippets.

@dustbyrn
Created June 28, 2011 19:10
Show Gist options
  • Save dustbyrn/1051936 to your computer and use it in GitHub Desktop.
Save dustbyrn/1051936 to your computer and use it in GitHub Desktop.
How to reload gems that you're working on
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
# load the gem from the local filesystem so we can work on it
gem 'couch_record', :path => '../couch_record'
@briankung
Copy link

Thanks!

@batamire
Copy link

One more time ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment