Reputation: 2824
I'm having trouble starting script/console.
I've tried cd
'ing into the project root ("C:\MyProject") then typing "script/console" and I get this:
'script' is not recognized as an internal or external command, operable program or batch file.
And when I type "ruby script/console" I get this:
Ruby: No such file or directory -- script/console (LoadError)
Any ideas? Should I be running these commands from the root? Thanks.
Upvotes: 4
Views: 8332
Reputation: 916
In Windows you need to use backslash (\) instead of the regular slash (/).
script\console
should work for you, provided you use Rails 2.x. On Rails 3 use rails console
as mentioned by other coleagues.
Upvotes: 0
Reputation: 10378
The usage ruby script/console
is present in Rails 2.3.x versions and older. I believe you installed Rails 3.x which deprecated that command.
You need to use now rails console
or rails c
(short version) from the application directory.
Better pay a visit to the Rails guides for all the other changes.
Upvotes: 12
Reputation: 2420
Is ruby installed? Is it in your PATH?
http://www.ruby-lang.org/en/downloads/
When it installs, look for the checkbox to add ruby to your path.
If it's already installed, then (on Windows 7), go to the Start Orb, type "path" and click on "Edit the system environment variables". Click on "Environment Variables". In the bottom list scroll down to "Path". Select "Path" and click "Edit". At the end of the "variable value" list put another semi-colon and the path to your ruby.exe.
EG: ";C:\Ruby\bin"
DO NOT delete anything else from that field.
Upvotes: -1