0

我正在尝试设置一个 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)

我无法理解这个错误以及如何解决它。我究竟做错了什么?请帮忙。

4

1 回答 1

1

尝试指定包含文件名的目标文件路径。

copy_file "/Users/amiterandole/Desktop/current/rails/templates/guard/Guardfile", "my_destination_path/Guardfile"
于 2013-06-25T19:38:54.073 回答