草庐IT

openssl_missing

全部标签

ruby - 在 Ruby 上获取 OpenSSL::X509::CertificateError 嵌套 asn1 错误

我有来自Apple的.p12文件,并尝试使用以下命令将其转换为.pem文件:opensslpkcs12-incert.p12-outapple_push_notification_development.pem-nodes-clcerts尝试创建新的OpenSSL::X509::Certificate对象时OpenSSL::X509::Certificate.new(File.read('apple_push_notification_development.pem'))我收到以下错误:OpenSSL::X509::CertificateError:nestedasn1errorfro

ruby-on-rails - 如何使用 OpenSSL::Cipher 加密 UTF-8 字符串中的数据?

在Rails3.0(Ruby1.9.2)应用程序中,我正在尝试使用如下方式加密一些数据:cipher=OpenSSL::Cipher.new'aes-256-cbc'cipher.encryptcipher.key=cipher.random_keycipher.iv=cipher.random_ivencrypted=cipher.update'mostsecretdataintheworld'encrypted这将进入UTF-8数据库。我的问题是>encrypted.encoding=>#>encrypted.encode'utf-8'Encoding::UndefinedConv

ruby - 加载 RubyGems 插件时出错,openssl.bundle (LoadError)

我是ruby新手。当我键入与gem相关的任何内容时,将发生以下错误。为什么会导致它以及如何解决问题?谢谢!ErrorloadingRubyGemsplugin"/Users/chiang/.rvm/gems/ruby-2.0.0-p247@global/gems/rubygems-bundler-1.2.2/lib/rubygems_plugin.rb":dlopen(/Users/chiang/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle,9):Librarynotloade

ruby-on-rails - Rails : render doesn't work, 仍然得到 `Template is missing`

我目前正在学习Rails指南。我完成了这些步骤,但仍然遇到错误。我的Ruby版本是ruby2.1.1p76,Rails版本是4.0.4。按照指南的指示,我创建了一个ArticleController。classArticlesController我应该得到{"title"=>"Firstarticle!","text"=>"Thisismyfirstarticle."但输出结果是TemplateismissingMissingtemplatearticles/create,application/createwith{:locale=>[:en],:formats=>[:html],:

ruby - 无法在 ruby​​ 中要求 openssl

我在我的虚拟机ubuntu12.04lts中安装了openssl。当我运行gem命令时出现错误。Error:whileexecutinggem(Gem::Exception)Unabletorequireopenssl.installopenSSLandrebuiltruby(preferred)orusenonHTTPssources而且我还在irb模式下测试了requireopenssl。它给出了错误。Loaderror:cannotloadsuchfile--opensslfrom/usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_

ruby-on-rails - OpenSSL::SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server hello A

下面的代码会产生以下错误:OpenSSL::SSL::SSLError:SSL_connectSYSCALLreturned=5errno=0state=SSLv3readserverhelloArequire'net/https'uri=URI.parse("https://.com")http=Net::HTTP.new(uri.host,uri.port)http.use_ssl=truehttp.ssl_version='SSLv3'http.get(uri.request_uri)知道为什么吗?我尝试了所有其他问题中提到的所有内容,仍然没有运气。Ruby1.9.3p484(2

ruby 和 "You must recompile Ruby with OpenSSL support or change the sources in your Gemfile"

我使用rvm将我的ruby​​升级到1.9.3-p392,还添加了2.0.0,每当我尝试使用这个版本时,当我运行我的bundle命令时,我都会收到这个错误。CouldnotloadOpenSSL.YoumustrecompileRubywithOpenSSLsupportorchangethesourcesinyourGemfilefrom'https'to'http'.InstructionsforcompilingwithOpenSSLusingRVMareavailableatrvm.io/packages/openssl.我已经按照几个不同的说明来解决这个问题。我尝试删除版本并

ruby-on-rails - rake 路由错误 "Missing :action key on routes definition"

我得到了$rakeroutesrakeaborted!ArgumentError:Missing:actionkeyonroutesdefinition,pleasecheckyourroutes./usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.1.5/lib/action_dispatch/routing/mapper.rb:243:in`default_controller_and_action'/usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.1.5/lib/action_dispa

ruby - `respond_to?` 与 `respond_to_missing?`

与定义respond_to?相比,定义respond_to_missing?有什么意义?如果为某些类重新定义respond_to?会出什么问题? 最佳答案 没有respond_to_missing?已定义,试图通过method获取方法会失败:classFoodefmethod_missingname,*argspargsenddefrespond_to?name,include_private=falsetrueendendf=Foo.newf.bar#=>[]f.respond_to?:bar#=>truef.method:bar

ruby-on-rails - ruby 2.0 rails gem 安装错误 "cannot load such file -- openssl"

我正在使用osx10.8.2安装了ruby2.0并且....尝试运行"sudogeminstallrails"时得到这个$sudogeminstallrailsERROR:Loadingcommand:install(LoadError)cannotloadsuchfile--opensslERROR:Whileexecutinggem...(NoMethodError)undefinedmethod`invoke_with_build_args'fornil:NilClass我之前使用ruby​​1.9.x和rails3.2.x工作正常 最佳答案