Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting script/console for Ruby on Rails with Windows

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.

like image 810
Colin Avatar asked Dec 27 '22 23:12

Colin


1 Answers

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.

like image 142
Luis Lavena Avatar answered Jan 09 '23 05:01

Luis Lavena