diff --git a/README.md b/README.md index 1b99104..535698c 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ It appears in the top menu. Example of Sidekiq worker. ``` -./plugins/redmine_sidekiq/workers/sandbox_worker.rb +./plugins/redmine_sidekiq/app/workers/sandbox_worker.rb ``` ### Sandbox Web UI @@ -64,7 +64,7 @@ Enqueue, click the `perform_async(*args)` of the Jobs. Enqueue from the command line. ``` -$ script/rails runner 'SandboxWorker.perform_async' +$ bin/rails runner 'SandboxWorker.perform_async' ``` ## License diff --git a/init.rb b/init.rb index ae5f51d..1f57807 100644 --- a/init.rb +++ b/init.rb @@ -1,3 +1,5 @@ +$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/lib" + require 'redmine_sidekiq/configure' require 'redmine_sidekiq/rails' diff --git a/lib/redmine_sidekiq/configure.rb b/lib/redmine_sidekiq/configure.rb index cb36ced..07fee76 100644 --- a/lib/redmine_sidekiq/configure.rb +++ b/lib/redmine_sidekiq/configure.rb @@ -7,9 +7,9 @@ module RedmineSidekiq class Configure - file = File.join(Rails.root, 'plugins/redmine_sidekiq/config/sidekiq.yml') + file = File.join(::Rails.root, 'plugins/redmine_sidekiq/config/sidekiq.yml') if File.exist?(file) - config = YAML.load_file(file)[Rails.env] + config = YAML.load_file(file)[::Rails.env] redis_conf = config['redis'].symbolize_keys end