Marco
Marco

Reputation: 4395

"rails generate" creates new "generate" project?

Running the command generates new rails projects:

$ rails generate controller home index 

The above will create four new rails projects: generate, controller, home, and index\

Why is this happening?

I'm using rails (2.3.5)

Upvotes: 2

Views: 1380

Answers (2)

mportiz08
mportiz08

Reputation: 10328

rails generate ...

creates a Rails project called "generate"

Use this instead:

ruby script/generate controller home index

Upvotes: 4

Sam Saffron
Sam Saffron

Reputation: 131192

My guess, you are trying to use Rails 3 syntax for a Rails 2 app.

You should use script/generate in Rails 2.

Upvotes: 11

Related Questions