LoginSignup
11
12

More than 5 years have passed since last update.

rails new 時のエラーの対処法

Posted at

rails new myapp

で以下のようなエラーが発生。

Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first.
Type 'rails' for help.

原因は、誤ってこの親ディレクトリでrails newしてしまった事が原因。

対処法としては、誤って作成されたRails関連のファイル・フォルダを削除する。

具体的には以下。
app
bin
config
db
lib
log
public
test
tmp
vendor
config.ru
Gemfile
Gemfile.lock
Rakefile
README.rdoc

参考にしたページ
https://www.ruby-forum.com/topic/1780147

11
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
12