全部,
在特定目录中创建一些文件后,我使用以下命令。它给我一条错误消息。
命令
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
我看到在初始化新项目时直接运行此命令的rails,bundle install
rails如何做到这一点?我如何使这个命令工作。