You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:1407:in fu_each_src_dest0': undefined methodto_str' for nil:NilClass (NoMethodError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:1393:in fu_each_src_dest' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:382:incp'
from ./../lib/eeepub/maker.rb:80:in save' from ./../lib/eeepub/maker.rb:78:ineach'
from ./../lib/eeepub/maker.rb:78:in save' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/tmpdir.rb:129:inmktmpdir'
from ./../lib/eeepub/maker.rb:77:in `save'
from simple_epub.rb:23
始めまして。epubに興味があり、rubyにも興味があったので
このソースでrubyを勉強させてもらっています。
macのruby 1.8.7とbuilderを入れた環境でexample/simple_epub.rbを実行すると
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:1407:in
fu_each_src_dest0': undefined method
to_str' for nil:NilClass (NoMethodError)from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:1393:in
fu_each_src_dest' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:382:in
cp'from ./../lib/eeepub/maker.rb:80:in
save' from ./../lib/eeepub/maker.rb:78:in
each'from ./../lib/eeepub/maker.rb:78:in
save' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/tmpdir.rb:129:in
mktmpdir'from ./../lib/eeepub/maker.rb:77:in `save'
from simple_epub.rb:23
となりました。中のソースを見てみると、ただ単なる文字列である[file]という変数なのに、
file[:dir]やfile[:path]とアクセスしていて、その結果がnilになるのが原因のようでした。
これは僕の環境が悪く、パスのような文字列だと何もせずに連想配列のようにアクセスできるものなのでしょうか?
それともサンプルのバージョンが間違っていて、いまではfilesで配列を渡すようになっているのでしょうか?
The text was updated successfully, but these errors were encountered: