John Malkovitz
John Malkovitz

Reputation: 55

Michael Hartl's Ruby on Rails Tutorial Chapter 2

I'm working through Michael Hartl's Ruby on Rails Tutorial. When I try to initiate the command rails _4.2.0_ new toy_app in section 2.1, I receive the following error from the Cloud9 terminal:

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

I've tried refreshing the file tree to no avail.

Upvotes: 0

Views: 834

Answers (1)

Mutahhir
Mutahhir

Reputation: 3832

If you're creating a new Rails Tutorial or Rails workspace, Cloud9 already sets up a new Rails project for you. That's probably the reason you're seeing this error. Since the rails project is already set up for you, you can go ahead and skip the rails new <project> step.

Alternatively, if you'd like to do make the Rails project yourself, you can select a 'Custom' workspace from the list of workspace types rather than 'Ruby on Rails' or 'Rails Tutorial'. Your workspace will then start with an empty project folder and you can run the above command without any problems.

Upvotes: 1

Related Questions