无法启动新的rails应用

时间:2021-10-10 18:41:23

When I try to start a new rails app, I get this notification:

当我尝试启动一个新的rails应用程序时,我收到此通知:

"Can't initialize a new Rails application within the directory of another, please Type 'rails' for help."

“无法在另一个目录中初始化新的Rails应用程序,请输入'rails'以获取帮助。”

I read that I may have to empty some directory because there may already be another rails app created. I'm not sure how to do this and start over.

我读到我可能要清空一些目录,因为可能已经创建了另一个rails应用程序。我不知道该怎么做才重新开始。

3 个解决方案

#1


2  

cd ~
cd ProjectsDir # <= Wherever you save your projects
rails new project
cd project
rails generate ...

#2


1  

typing cd .. means going backwards in the directory you're in ...

输入cd ..意味着在你所在的目录中倒退...

for example, you're in this_directory, and it's on desktop ...

例如,你在this_directory中,它在桌面上......

so, typing cd .. while in this_directory means that you're back on desktop directory now ...

所以,输入cd ..而在this_directory中意味着你现在回到桌面目录...

as for the current directory that you're in, don't worry about it ...

至于您所在的当前目录,请不要担心......

just go backwards, and when outside of it, you can delete that directory as you wish, or leave it alone.

只需向后移动,当它在外面时,您可以根据需要删除该目录,或者不管它。

type "rails new name_of_app" to start a new rails project ...

键入“rails new name_of_app”以启动新的rails项目...

and of course, type cd name_of_app to go into the directory of your new rails project.

当然,键入cd name_of_app进入新rails项目的目录。

let us know if you need further clarification ...

如果您需要进一步澄清,请告诉我们......

#3


0  

cd ../
rails new i_am_in_new_directory

#1


2  

cd ~
cd ProjectsDir # <= Wherever you save your projects
rails new project
cd project
rails generate ...

#2


1  

typing cd .. means going backwards in the directory you're in ...

输入cd ..意味着在你所在的目录中倒退...

for example, you're in this_directory, and it's on desktop ...

例如,你在this_directory中,它在桌面上......

so, typing cd .. while in this_directory means that you're back on desktop directory now ...

所以,输入cd ..而在this_directory中意味着你现在回到桌面目录...

as for the current directory that you're in, don't worry about it ...

至于您所在的当前目录,请不要担心......

just go backwards, and when outside of it, you can delete that directory as you wish, or leave it alone.

只需向后移动,当它在外面时,您可以根据需要删除该目录,或者不管它。

type "rails new name_of_app" to start a new rails project ...

键入“rails new name_of_app”以启动新的rails项目...

and of course, type cd name_of_app to go into the directory of your new rails project.

当然,键入cd name_of_app进入新rails项目的目录。

let us know if you need further clarification ...

如果您需要进一步澄清,请告诉我们......

#3


0  

cd ../
rails new i_am_in_new_directory