Pregunta

I started in rails with version 2.3.5 with a tutorial. Some of the commands do not work, for example:

$ rails generate controller welcome index 

This does not work as the tutorial is using another version. Can some one suggest the basic commands of v2.3.5?

¿Fue útil?

Solución

First of all, if you are starting with Rails you should not be trying to learn 2.3. That said, in 2.3 all comands are in the script directory:

$ ls -1 script
about
console
dbconsole
destroy
generate
performance
plugin
runner
server

You can run them like this:

ruby script/generate controller welcome index

You can learn more about each command using --help, for example:

ruby script/generate --help
Usage: script/generate generator [options] [args]
...

API documentation for 2.3 is here and Rails Guides for 2.3 are here

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top