"rails new"没有生成我的项目的任何文件夹 [英] "rails new" is not generating any of my project's folders
问题描述
我已经下载了Ruby,并安装了rails gem,然后尝试运行rails new my-project
,我得到的只是这个:
I have downloaded Ruby, and installed the rails gem, then I attempt to run rails new my-project
and all I get is this:
c:\Projects>rails new my-project
create
create README.md
create Rakefile
create .ruby-version
create config.ru
create .gitignore
create Gemfile
run git init from "."
当我打开Rails为我创建的my-project
文件夹时,我发现的只是:
When I open the my-project
folder that rails created for me what I find in it is only:
.gitignore
.ruby-version
config.ru
Gemfile
Rakefile
README.md
没别的.
这不是我在家进行测试时得到的,也不是任何指南说我应该得到的.我的Rails生成的文件夹恰好为零,离我开始开发所需的文件夹不远.我认为我不会丢失任何安装.这是ruby和rails的版本:
This is not what I got when testing this at home, and it's not what any guide says I should get. I have exactly zero folders generated by rails, it's nowhere near what I need to start development. I don't think I'm missing any installations. Here are the versions of ruby and of rails:
c:\Projects>ruby -v
ruby 2.6.5p114 (2019-10-01 revision 67812) [x64-mingw32]
c:\Projects>rails -v
Rails 6.0.2
IIRC,我在rubyinstaller.org(Devkit的最新版本)上使用Windows Ruby Installer安装了Ruby,然后我简单地运行gem install rails
来获取Rails.
IIRC I installed Ruby using the Windows Ruby Installer at rubyinstaller.org, the latest version with Devkit, then I simply ran gem install rails
to get Rails.
我唯一能想到的是我的用户在这台计算机上没有管理员权限,但是如果我要求这样做,那么当我尝试使用Google时,Google所提供的一切就是如何在我的应用程序中实现管理功能. /p>
The only thing I can think of is that my user does not have admin privileges in this computer, but when I try to Google if this is a requirement, all Google gives me is how to implement admin stuff in my app.
推荐答案
尝试将--skip-git
附加到您的rails new
命令中.这将使您在短期内得到发展.
Try appending --skip-git
to your rails new
command. This will get you going in the short term.
或者,从长远来看(也许是更好的选择),安装git
.可以在以下位置找到Git官方文档的安装说明: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
Alternatively (and probably the better option in the long run), install git
. The official Git documentation install instructions can be found here: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
这篇关于"rails new"没有生成我的项目的任何文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!