“无法在另一个目录中初始化新的Rails应用程序,请键入'rails'以获取帮助." [英] "Can't initialize a new Rails application within the directory of another, please Type 'rails' for help."

查看:76
本文介绍了“无法在另一个目录中初始化新的Rails应用程序,请键入'rails'以获取帮助."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是从Rails开始,我正在练习基本的ruby命令,其中之一是rails new myproject命令.

I'm just starting out with rails and I'm practicing the basic ruby commands, one of which is the rails new myproject command.

我的项目位于Aptana工作区目录下,我在其中使用了命令行,而Aptana都在此处创建了项目.经过几次创建以及rails s命令和删除后,当我尝试生成新的rails项目时,我已经开始收到以下错误消息:

My projects are under the Aptana workspace directory where I've used the command line and Aptana both to create projects there. After a few creations and rails s commands and deletions, I've started getting this error message when I try to generate a new rails project:

"无法在以下目录中初始化新的Rails应用程序 另外,请输入"rails"以获取帮助."

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

这不仅在我在Aptana工作空间目录下创建一个新项目(rails new myproject)时发生,而且在我直接在工作空间目录内使用命令rails new .时也会发生.有人可以向我解释冲洗滑轨需要做什么,以便知道我在那里不再有项目吗?我做了什么才能做到这一点?

This doesn't just happen when I create a new project (rails new myproject) under the Aptana workspace directory, but also when I use the command rails new . directly inside the workspace directory. Can someone explain to me what I need to do to flush rails so it knows I don't have a project there anymore? What did I do to make this happen?

推荐答案

我不记得要寻找什么滑轨.解决此问题的最快方法是完全清空受影响的目录.

I don't remember what rails looking for. The quickest way to solve this issue is to completely empty the affected directory.

最有可能存在一些隐藏的文件或目录,这些文件或目录会阻止Rails创建新项目.用ls -a来看,该目录中可能有一个.bundle文件夹.

Most likely there are some hidden files or directories which prevents rails from creating a new project. Look at that with ls -a probably there is a .bundle folder inside that dir.

这篇关于“无法在另一个目录中初始化新的Rails应用程序,请键入'rails'以获取帮助."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆