Reputation: 157
I’m using Windows 10, installed Ruby 2.6.14 and bash 4.3.42(5). And I can’t run ruby, the error follows below:
PS F:\App\App> rails c
rails : The term 'rails' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1
+ rails c
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (rails:String) [], CommandNotFoundEx
ception
+ FullyQualifiedErrorId : CommandNotFoundException
In edit environment variable, I have : C:\Ruby24-x64\bin\
Thanks in advance for your help
Upvotes: 1
Views: 3938
Reputation: 11
Open a command prompt, or power shell, or terminal in runs as administrator mode and then execute the gem install rails in it.
Because package manager program or installer program required permission to create, write and read directory and files.
Upvotes: 0
Reputation: 704
I think you have not installed rails, The error is saying the command rails is not found in path. Follow below steps to fix this issue
Upvotes: 1