twist: error on the page 9: Errno::ENOENT: No such file or directory @ unlink_internal - /twist/repos/radar/markdown_book_test
$ ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]
➜ twist git:(master) rails -v
Rails 5.0.0.1
I’m following these steps on the page 9:
git clone git@github.com:radar/twist
cd twist
git submodule update --init
bundle install
rake db:setup
bundle exec rspec spec
when I try to clone I get these errors:
git clone git@github.com:radar/twist
Cloning into 'twist'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
and was just possible to clone with this:
git clone https://github.com/radar/twist.git
So the rest worked fine until the rake db:setup because I have problems with postgresql. For fix was this command: brew services start postgres
then rake db:setup works great.
So the `git submodule update --init` was cloned for there:
$ tree spec/fixtures/repos/radar/
spec/fixtures/repos/radar/
└── markdown_book_test
├── Book.txt
├── appendix.markdown
├── chapter_1
│ └── chapter_1.markdown
├── chapter_2
│ └── chapter_2.markdown
├── images
│ └── chapter_1
│ └── 1.png
└── introduction.markdown
5 directories, 6 files
And then when I try to running the RSpec command I get these errors:
`➜ twist git:(master) bundle exec rspec spec .Too many arguments. usage: git clone [<options>] [–] <repo> [<dir>]
-v, --verbose be more verbose
-q, --quiet be more quiet
--progress force progress reporting
-n, --no-checkout don't create a checkout
--bare create a bare repository
--mirror create a mirror repository (implies bare)
-l, --local to clone from a local repository
--no-hardlinks don't use local hardlinks, always copy
-s, --shared setup as shared repository
--recursive initialize submodules in the clone
--recurse-submodules initialize submodules in the clone
-j, --jobs <n> number of submodules cloned in parallel
--template <template-directory>
directory from which templates will be used
--reference <repo> reference repository
--dissociate use --reference only while cloning
-o, --origin <name> use <name> instead of 'origin' to track upstream
-b, --branch <branch>
checkout <branch> instead of the remote's HEAD
-u, --upload-pack <path>
path to git-upload-pack on the remote
--depth <depth> create a shallow clone of that depth
--single-branch clone only one branch, HEAD or --branch
--shallow-submodules any cloned submodules will be shallow
--separate-git-dir <gitdir>
separate git dir from working tree
-c, --config <key=value>
set config inside the new repository
-4, --ipv4 use IPv4 addresses only
-6, --ipv6 use IPv6 addresses only
FF
It’s trying to go in twist/repos/radar/markdown_book_test but the path is twist/spec/fixtures/repos/radar/markdown_book_test
FF
Failures:
1) Books navigating sees a list of frontmatter / mainmatter / backmatter
Failure/Error:
Dir.chdir(book.path) do
lines = File.readlines("Book.txt")
manifest = book.process_manifest(lines)
manifest.each do |part, file_names|
file_names.each_with_index do |file_name, position|
next if file_name.strip.blank?
chapter = book.chapters.find_or_create_by(file_name: file_name, part: part)
chapter.position = position + 1
chapter.process!
end
Errno::ENOENT:
No such file or directory @ dir_chdir - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
2) Books navigating can navigate through all the book
Failure/Error:
Dir.chdir(book.path) do
lines = File.readlines("Book.txt")
manifest = book.process_manifest(lines)
manifest.each do |part, file_names|
file_names.each_with_index do |file_name, position|
next if file_name.strip.blank?
chapter = book.chapters.find_or_create_by(file_name: file_name, part: part)
chapter.position = position + 1
chapter.process!
end
Errno::ENOENT:
No such file or directory @ dir_chdir - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
3) commenting as an author a normal comment
Failure/Error:
Dir.chdir(book.path) do
lines = File.readlines("Book.txt")
manifest = book.process_manifest(lines)
manifest.each do |part, file_names|
file_names.each_with_index do |file_name, position|
next if file_name.strip.blank?
chapter = book.chapters.find_or_create_by(file_name: file_name, part: part)
chapter.position = position + 1
chapter.process!
end
Errno::ENOENT:
No such file or directory @ dir_chdir - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
4) commenting as an author accepting a note
Failure/Error:
Dir.chdir(book.path) do
lines = File.readlines("Book.txt")
manifest = book.process_manifest(lines)
manifest.each do |part, file_names|
file_names.each_with_index do |file_name, position|
next if file_name.strip.blank?
chapter = book.chapters.find_or_create_by(file_name: file_name, part: part)
chapter.position = position + 1
chapter.process!
end
Errno::ENOENT:
No such file or directory @ dir_chdir - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
5) commenting as an author rejecting a note
Failure/Error:
Dir.chdir(book.path) do
lines = File.readlines("Book.txt")
manifest = book.process_manifest(lines)
manifest.each do |part, file_names|
file_names.each_with_index do |file_name, position|
next if file_name.strip.blank?
chapter = book.chapters.find_or_create_by(file_name: file_name, part: part)
chapter.position = position + 1
chapter.process!
end
Errno::ENOENT:
No such file or directory @ dir_chdir - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
6) notes can add a new note to a paragraph
Failure/Error:
Dir.chdir(book.path) do
lines = File.readlines("Book.txt")
manifest = book.process_manifest(lines)
manifest.each do |part, file_names|
file_names.each_with_index do |file_name, position|
next if file_name.strip.blank?
chapter = book.chapters.find_or_create_by(file_name: file_name, part: part)
chapter.position = position + 1
chapter.process!
end
Errno::ENOENT:
No such file or directory @ dir_chdir - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
7) notes can view all notes for a book
Failure/Error:
Dir.chdir(book.path) do
lines = File.readlines("Book.txt")
manifest = book.process_manifest(lines)
manifest.each do |part, file_names|
file_names.each_with_index do |file_name, position|
next if file_name.strip.blank?
chapter = book.chapters.find_or_create_by(file_name: file_name, part: part)
chapter.position = position + 1
chapter.process!
end
Errno::ENOENT:
No such file or directory @ dir_chdir - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
8) notes can reopen a note
Failure/Error:
Dir.chdir(book.path) do
lines = File.readlines("Book.txt")
manifest = book.process_manifest(lines)
manifest.each do |part, file_names|
file_names.each_with_index do |file_name, position|
next if file_name.strip.blank?
chapter = book.chapters.find_or_create_by(file_name: file_name, part: part)
chapter.position = position + 1
chapter.process!
end
Errno::ENOENT:
No such file or directory @ dir_chdir - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
9) notes changing a note's state can accept a note
Failure/Error:
Dir.chdir(book.path) do
lines = File.readlines("Book.txt")
manifest = book.process_manifest(lines)
manifest.each do |part, file_names|
file_names.each_with_index do |file_name, position|
next if file_name.strip.blank?
chapter = book.chapters.find_or_create_by(file_name: file_name, part: part)
chapter.position = position + 1
chapter.process!
end
Errno::ENOENT:
No such file or directory @ dir_chdir - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
10) notes changing a note's state can reject a note
Failure/Error:
Dir.chdir(book.path) do
lines = File.readlines("Book.txt")
manifest = book.process_manifest(lines)
manifest.each do |part, file_names|
file_names.each_with_index do |file_name, position|
next if file_name.strip.blank?
chapter = book.chapters.find_or_create_by(file_name: file_name, part: part)
chapter.position = position + 1
chapter.process!
end
Errno::ENOENT:
No such file or directory @ dir_chdir - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
11) signing out can sign out
Failure/Error: click_link "Sign in"
Capybara::ElementNotFound:
Unable to find link "Sign in"
12) Git updates an existing repository
Failure/Error: `git clone -q #{self.class.host}#{user}/#{repo} #{path}`
#<Git:0x007fe13a5d90f8 @user="radar", @repo="markdown_book_test"> received :` with unexpected arguments
expected: ("git checkout -q")
got: ("git clone -q /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/spec/fixtur...romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test")
13) Book upon creation processes a test Markdown book
Failure/Error:
Dir.chdir(book.path) do
lines = File.readlines("Book.txt")
manifest = book.process_manifest(lines)
manifest.each do |part, file_names|
file_names.each_with_index do |file_name, position|
next if file_name.strip.blank?
chapter = book.chapters.find_or_create_by(file_name: file_name, part: part)
chapter.position = position + 1
chapter.process!
end
Errno::ENOENT:
No such file or directory @ dir_chdir - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
14) Chapter can process markdown
Failure/Error: FileUtils.rm_r(git.path)
Errno::ENOENT:
No such file or directory @ unlink_internal - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
15) Chapter updating an existing chapter keeps elements with notes
Failure/Error: FileUtils.rm_r(git.path)
Errno::ENOENT:
No such file or directory @ unlink_internal - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
16) Chapter navigation chapter 1 links back to only chapter in previous part
Failure/Error: FileUtils.rm_r(git.path)
Errno::ENOENT:
No such file or directory @ unlink_internal - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
17) Chapter navigation chapter 1 links back to highest positioned chapter in previous part
Failure/Error: FileUtils.rm_r(git.path)
Errno::ENOENT:
No such file or directory @ unlink_internal - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
18) Chapter navigation chapter 1 links to next chapter in same part
Failure/Error: FileUtils.rm_r(git.path)
Errno::ENOENT:
No such file or directory @ unlink_internal - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
19) Chapter navigation last chapter of part links back to previous chapter
Failure/Error: FileUtils.rm_r(git.path)
Errno::ENOENT:
No such file or directory @ unlink_internal - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
20) Chapter navigation last chapter of part links to first chapter in next part
Failure/Error: FileUtils.rm_r(git.path)
Errno::ENOENT:
No such file or directory @ unlink_internal - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
21) Comment upon creation sends an email to note author + commentors, minus comment owner
Failure/Error:
Dir.chdir(book.path) do
lines = File.readlines("Book.txt")
manifest = book.process_manifest(lines)
manifest.each do |part, file_names|
file_names.each_with_index do |file_name, position|
next if file_name.strip.blank?
chapter = book.chapters.find_or_create_by(file_name: file_name, part: part)
chapter.position = position + 1
chapter.process!
end
Errno::ENOENT:
No such file or directory @ dir_chdir - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
22) Comment upon creation sends notification emails to the right users
Failure/Error:
Dir.chdir(book.path) do
lines = File.readlines("Book.txt")
manifest = book.process_manifest(lines)
manifest.each do |part, file_names|
file_names.each_with_index do |file_name, position|
next if file_name.strip.blank?
chapter = book.chapters.find_or_create_by(file_name: file_name, part: part)
chapter.position = position + 1
chapter.process!
end
Errno::ENOENT:
No such file or directory @ dir_chdir - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
23) Chapter processes a chapter
Failure/Error: FileUtils.rm_r(git.path)
Errno::ENOENT:
No such file or directory @ unlink_internal - /Users/romenigld/workspace/ebooks/Multitenancy with Rails 2nd Edition/twist/repos/radar/markdown_book_test
Finished in 6.9 seconds (files took 10.71 seconds to load)
48 examples, 23 failures
Failed examples:
rspec ./spec/features/books_spec.rb:12 # Books navigating sees a list of frontmatter / mainmatter / backmatter
rspec ./spec/features/books_spec.rb:29 # Books navigating can navigate through all the book
rspec ./spec/features/comments_spec.rb:29 # commenting as an author a normal comment
rspec ./spec/features/comments_spec.rb:38 # commenting as an author accepting a note
rspec ./spec/features/comments_spec.rb:48 # commenting as an author rejecting a note
rspec ./spec/features/notes_spec.rb:10 # notes can add a new note to a paragraph
rspec ./spec/features/notes_spec.rb:38 # notes can view all notes for a book
rspec ./spec/features/notes_spec.rb:89 # notes can reopen a note
rspec ./spec/features/notes_spec.rb:75 # notes changing a note's state can accept a note
rspec ./spec/features/notes_spec.rb:82 # notes changing a note's state can reject a note
rspec ./spec/features/users/signing_out_spec.rb:10 # signing out can sign out
rspec ./spec/lib/git_spec.rb:25 # Git updates an existing repository
rspec ./spec/models/book_spec.rb:41 # Book upon creation processes a test Markdown book
rspec ./spec/models/chapter_spec.rb:13 # Chapter can process markdown
rspec ./spec/models/chapter_spec.rb:42 # Chapter updating an existing chapter keeps elements with notes
rspec ./spec/models/chapter_spec.rb:61 # Chapter navigation chapter 1 links back to only chapter in previous part
rspec ./spec/models/chapter_spec.rb:71 # Chapter navigation chapter 1 links back to highest positioned chapter in previous part
rspec ./spec/models/chapter_spec.rb:88 # Chapter navigation chapter 1 links to next chapter in same part
rspec ./spec/models/chapter_spec.rb:116 # Chapter navigation last chapter of part links back to previous chapter
rspec ./spec/models/chapter_spec.rb:120 # Chapter navigation last chapter of part links to first chapter in next part
rspec ./spec/models/comment_spec.rb:28 # Comment upon creation sends an email to note author + commentors, minus comment owner
rspec ./spec/models/comment_spec.rb:39 # Comment upon creation sends notification emails to the right users
rspec ./spec/models/markdown_chapter_spec.rb:20 # Chapter processes a chapter
what I need to do for fix?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (9 by maintainers)
Commits related to this issue
- Use rm_rf to delete markdown_book_test directory in tests This doesn't care if the directory doesn't exist For #16 — committed to radar/twist by radar 7 years ago
Now it works!
I’m exciting for read this book. Thank’s Ryan Big!!!