In Windows, “Rails new” does not create all the files and folders, stops at -> run git init from “.”

为君一笑 提交于 2020-01-16 19:37:10

问题


When I type -> rails new test_app, it only does the following -> create create README.md create Rakefile create .ruby-version create config.ru create .gitignore create Gemfile run git init from "."

I was able to run this command successfully (where it created all the folders and files needed in a rails app) in my c:\users\ directory, however was not able to run it anymore after that. I have also deleted all rails related files in that directory and retried, but have had no success.

Please help.


回答1:


Install git from Git-Scm.

Enter git --version in command line if it returns version info go ahead and run

rails new projectname

If git --version throws error in command prompt as 'git' is not recognized as an internal or external command. Add environment variable for git. Refer Stackoverflow link to add environment variables for git



来源:https://stackoverflow.com/questions/59442185/in-windows-rails-new-does-not-create-all-the-files-and-folders-stops-at-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!