Reputation: 14159
I am writing a small blog application using Rails. I am using Aptana Studio.
When I try to execute:
ruby script/generate scaffold post title:string body:text
from either Aptana Studio or going to the project folder and executing it from the shell, I get this error:
c:\Ruby200\bin\ruby.exe: No such file or directory -- script/generate (LoadError
)
Upvotes: 0
Views: 1363
Reputation: 2832
I think you are meaning to do rails generate
?
First create a new Rails app:
rails new random_app
cd random_app
rails generate scaffold post title:string body:text
When you "ruby" something, it looks for a file to execute.
Rails is the framework for abstraction and scaffolding.
See "Why does Ruby "script/generate" return "No such file or directory"?".
Rails 3 is the problem. Since Rails 3, all of the "script/whatever" commands have been replaced with "rails whatever".
So now you want rails generate ...
or rails server
instead.
Upvotes: 3