Colin Colin - 2 years ago 104
Ruby Question

Starting script/console for Ruby on Rails with Windows

I'm having trouble starting script/console.

I've tried

'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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download