using magic-encoding gem under windows

2019-08-20 04:41发布

问题:

I'm trying to use the magic-encoding gem in a console under Windows 8.1. Here's what I get:

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\User\RubymineProjects\MyProject>gem install magic_encoding
Fetching: magic_encoding-0.0.2.gem (100%)
Successfully installed magic_encoding-0.0.2
1 gem installed
Installing ri documentation for magic_encoding-0.0.2...
Installing RDoc documentation for magic_encoding-0.0.2...

C:\Users\User\RubymineProjects\MyProject>magic-encoding
'magic-encoding' is not recognized as an internal or external command,
operable program or batch file.

So how do I invoke it under Windows?

回答1:

Check if your ruby bin directory contains the file magic_encoding.bat. If it exits, try to use full path to invoke it:

..\MyProject> C:\RailsInstaller\Ruby1.9.3\bin\magic_encoding


标签: ruby gem