Reputation: 1173
I'm getting this error:
Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first
But I'm not in a rails directory, I'm on the desktop. There's no .bundle files anywhere to be found. Any ideas?
Upvotes: 0
Views: 3550
Reputation: 558
I was having the same problem this morning and that's because rails was already been there while i was creating my application.
To remove the error just go to bin folder of your application and remove the rails folder, and try to create new rails application in your planned folder using rails new app_name.
Upvotes: 0
Reputation: 91
This fixed my problem. I was also getting the same error message
"Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first. Type 'rails' for help."
Upvotes: 9
Reputation: 1542
I was struggling with this over the weekend, but after lots of prodding and poking got it to work.
The problem for me was that Aptana (I believe) created a second rails script in my local bin directory (~/bin
) which was called instead of the system script. This local version was older than /usr/local/bin/rails
. After moving aside ~/bin/rails
, "rails new fred" worked as expected.
Upvotes: 1