Skip to content

Instantly share code, notes, and snippets.

@cheald
Created October 18, 2012 04:54
Show Gist options
  • Save cheald/3909912 to your computer and use it in GitHub Desktop.
Save cheald/3909912 to your computer and use it in GitHub Desktop.
class Application < Rails::Application
# ...
config.autoload_paths << File.join(config.root, "app", "workers")
# ...
end
task :generate_appcache_manifest => :environment do
# ...
puts Rails.configuration.autoload_paths.inspect
purger = VarnishPurgeWorker.new
# ...
end
# app/workers/varnish_purge_worker.rb defines VarnishPurgeWorker
% rake assets:generate_appcache_manifest --trace
** Invoke assets:generate_appcache_manifest (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Execute assets:generate_appcache_manifest
["/var/www/myapp/app/decorators", "/var/www/myapp/app/workers", "/var/www/myapp/lib"]
rake aborted!
uninitialized constant VarnishPurgeWorker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment