после обновления Ruby 2.2 до Ruby 2.3 вызовы powershell перестали работать, так как профили powershell не загружаются.
1) Если я открываю командную строку, это работает:
C:Usersadministrador>powershell.exe ls
Directory: C:Usersadministrador
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 26/06/2015 16:20 .android
d---- 24/08/2015 16:25 .gem
d-r-- 30/06/2017 11:27 Contacts
d-r-- 06/07/2017 16:53 Desktop
d-r-- 30/06/2017 11:27 Documents
d-r-- 30/06/2017 11:27 Downloads
d-r-- 30/06/2017 11:27 Favorites
d-r-- 30/06/2017 11:27 Links
d-r-- 30/06/2017 11:27 Music
d-r-- 30/06/2017 11:27 Pictures
d-r-- 30/06/2017 11:27 Saved Games
d-r-- 30/06/2017 11:27 Searches
d-r-- 30/06/2017 11:27 Videos
-a--- 22/01/2015 11:18 1796 volshext.log
2) но если использовать Ruby, он не работает. Я выполняю командную строку от имени администратора:
irb(main):002:0> system("powershell ls")
File C:WindowsSysWOW64WindowsPowerShellv1.0profile.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.
At line:1 char:2
+ . <<<< 'C:WindowsSysWOW64WindowsPowerShellv1.0profile.ps1'
+ CategoryInfo : NotSpecified: (:) [], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException
File C:WindowsSysWOW64WindowsPowerShellv1.0Microsoft.PowerShell_profile.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.
At line:1 char:2
+ . <<<< 'C:WindowsSysWOW64WindowsPowerShellv1.0Microsoft.PowerShell_profile.ps1'
+ CategoryInfo : NotSpecified: (:) [], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException
File C:UsersadministradorDocumentsWindowsPowerShellMicrosoft.PowerShell_profile.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.
At line:1 char:2
+ . <<<< 'C:UsersadministradorDocumentsWindowsPowerShellMicrosoft.PowerShell_profile.ps1'
+ CategoryInfo : NotSpecified: (:) [], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException
Directory: C:Usersadministrador
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 26/06/2015 16:20 .android
d---- 24/08/2015 16:25 .gem
d-r-- 30/06/2017 11:27 Contacts
d-r-- 06/07/2017 16:53 Desktop
d-r-- 30/06/2017 11:27 Documents
d-r-- 30/06/2017 11:27 Downloads
d-r-- 30/06/2017 11:27 Favorites
d-r-- 30/06/2017 11:27 Links
d-r-- 30/06/2017 11:27 Music
d-r-- 30/06/2017 11:27 Pictures
d-r-- 30/06/2017 11:27 Saved Games
d-r-- 30/06/2017 11:27 Searches
d-r-- 30/06/2017 11:27 Videos
-a--- 22/01/2015 11:18 1796 volshext.log
=> true
что может быть не так?