在创建特定目录中的某些文件后,我使用下面的命令。它给我一个错误信息。
命令
desc "new project_name", "new a project with a name"
def new(project_name = 'my_project')
directory 'doc', project_name
path = Dir.pwd + '/' + project_name
system("cd #{path}")
run('bundle install')
#But this command is working that makes me so confusing
#run("cd #{path} && bundle install")
#puts "Initializing complete"
end
错误
create aaaaaaa/views/index.slim
create aaaaaaa/views/layout.slim
run bundle install from "."
Could not locate Gemfile
我看到直接运行这个表彰bundle install
当初始化一个新项目的导轨,导轨可怎么办呢?我如何使这个命令工作。
系统命令是否从不同位置运行“cd/path_to_directory”?也许从/开始也许你应该尝试做一个光盘到一个绝对目录,并检查是否有效。 – Genzume
我编辑了我的问题进行修复。我确定'cd'的目录路径是正确的。 – coolesting