簡體   English   中英

為什么我的copy_file命令不起作用?

[英]Why is my thor copy_file command not working?

我正在嘗試設置Rails應用程序模板,並在我的sample.rb模板文件中包含以下代碼:

run "bundle install"

copy_file "/Users/amiterandole/Desktop/current/rails/templates/guard/Guardfile", "."

捆綁軟件安裝運行良好,但復制命令失敗,並顯示以下錯誤:

/usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/actions/create_file.rb:47:in `binread': Is a directory - /Users/amiterandole/Desktop/current/rails/templates/myapp (Errno::EISDIR)

我無法理解此錯誤以及如何解決。 我究竟做錯了什么? 請幫忙。

嘗試指定目標文件路徑,包括文件名。

copy_file "/Users/amiterandole/Desktop/current/rails/templates/guard/Guardfile", "my_destination_path/Guardfile"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM