2013-01-22 76 views
0

我想建立一個Rails應用程序模板,並在我的sample.rb模板文件中有這樣的代碼:爲什麼我的thor copy_file命令不起作用?

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) 

我不明白這個錯誤以及如何解決它。我究竟做錯了什麼?請幫忙。

+0

請顯示您的配置文件 – Lichtamberg

+0

@Lichtamberg我其實沒有這些。這些究竟是什麼?你能指點我的文檔嗎?我正在使用獨立的ruby文件 –

回答

1

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

copy_file "/Users/amiterandole/Desktop/current/rails/templates/guard/Guardfile", "my_destination_path/Guardfile" 
相關問題