Closed idoan closed 8 years ago
The sidekiq job which runs after book.enqueue is called (you are running sidekiq, aren't you?) should create this directory.
Please confirm you're running sidekiq. If you are, then I will need to take a deeper look at why this is happening.
On 15 Jun 2016, at 03:20, idoan notifications@github.com wrote:
In order for your 3 lines of code in Read.me to run:
book = Book.create(:title => "Markdown Book Test", :path => 'radar/markdown_book_test') book.enqueue User.create(:email => "test@example.com", :password => "password")
either, You must remove "repos" in the .gitignore considering you already have markdown_book_test folder there, because this code snippet looks for folder Pathname.new(Rails.root + "repos") , which doesn't exist. or you must instruct reader in Read.Me to copy paste folder from "spec/fixtures/repos/radar/markdown_book_test" to "repos/radar/markdown_book_test"
otherwise sidekiq will raise an error of "file/folder not found error", and the tests will fail.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
yes, of course sidekiq is working. in fact, sidekiq itself is throwing that error. clone the repo and give it a try . here is the exact error :
2016-06-16T07:56:44.494Z 1105 TID-oxhkx5x2s WARN: {"class"=>"BookWorker", "args"=>["1"], "retry"=>true, "queue"=>"default", "jid"=>"1abcdc69a0dd3650fa39a0e3", "created_at"=>1466063722.312774, "enqueued_at"=>1466063804.490088, "error_message"=>"No such file or directory @ dir_chdir - /Users/XXXX/Development/Rails/twist-my-saas-stripe/repos/radar/markdown_book_test", "error_class"=>"Errno::ENOENT", "failed_at"=>1466063722.336255, "retry_count"=>2, "retried_at"=>1466063804.49359}
ok, I think I have found the problem, you commented out the line in BookWorker.rb where this repository is cloned, #git.update!
, when you uncomment this, as you tell the markdown_book_test repository is cloned to the correct path.
I think you wrongfully commented out git.update
instead of the above line book.current_commit = git.current_commit rescue nil
, since you don't use current_commit anywhere . am I right?
Both lines should be uncommented. Thanks for lettign me know about that :)
In order for your 3 lines of code in Read.me to run:
book = Book.create(:title => "Markdown Book Test", :path => 'radar/markdown_book_test') book.enqueue User.create(:email => "test@example.com", :password => "password")
either, You must remove "repos" in the .gitignore considering you already have markdown_book_test folder there, because this code snippet looks for folder
Pathname.new(Rails.root + "repos")
, which doesn't exist. or you must instruct reader in Read.Me to copy paste folder from "spec/fixtures/repos/radar/markdown_book_test" to "repos/radar/markdown_book_test", and also remove the preceding "../../" in markdown_book_test/.git fileotherwise sidekiq will raise an error of "file/folder not found error", and the tests will fail.