我无法导入密钥文件。我使用ruby1.9.3和ruby https://github.com/ueno/ruby-gpgme
require "gpgme"
begin
key = GPGME::Key.import(File.open("private.key"), {:password => "redacted"})
rescue GPGME::Error => g
puts g.inspect
puts g.message
puts g.code
puts g.source
end输出
设备不合适的ioctl
更多信息: /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gpgme-2.0.2/lib/gpgme/ctx.rb:43:in new': Inappropriate ioctl for device (GPGME::Error) from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gpgme-2.0.2/lib/gpgme/key.rb:120:in导入“从gpgme.rb:17:in‘”
这是ctx.rb文件,但我不知道是什么引起了这个问题.https://github.com/ueno/ruby-gpgme/blob/master/lib/gpgme/ctx.rb
发布于 2014-01-17 01:02:58
这个错误是gpgme出现问题的结果。所以我重新安装了gpgme。我用了"brew gpgme“现在看来起作用了。
https://stackoverflow.com/questions/21172576
复制相似问题