【问题标题】:In Windows, "Rails new" does not create all the files and folders, stops at -> run git init from "."在 Windows 中,“Rails new”不会创建所有文件和文件夹,会停在 -> 从“.”运行 git init
【发布时间】:2019-12-22 06:39:24
【问题描述】:

当我输入 -> rails new test_app 时,它只执行以下操作 -> 创造 创建 README.md 创建耙文件 创建 .ruby 版本 创建 config.ru 创建 .gitignore 创建 Gemfile 从“.”运行 git init

我能够在我的 c:\users\ 目录中成功运行此命令(它在其中创建了 rails 应用程序所需的所有文件夹和文件),但之后就无法再运行它了。我还删除了该目录中所有与 rails 相关的文件并重试,但没有成功。

请帮忙。

【问题讨论】:

  • 感谢您的建议!我会试试的

标签: ruby-on-rails new-operator


【解决方案1】:

Git-Scm 安装 git。

如果返回版本信息,在命令行输入git --version继续运行

rails new projectname

如果git --version 在命令提示符中抛出错误,因为 'git' 未被识别为内部或外部命令。为 git 添加环境变量。参考Stackoverflow link to add environment variables for git

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-09-16
    • 2021-10-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-09
    • 2022-06-30
    相关资源
    最近更新 更多