I'm getting an argument error within a Rails (3.1.7) Application when I do this:
....
cert = OpenSSL::X509::Certificate.new(File.read(cert_file))
....
The error mesage is: wrong number of arguments (1 for 0)
But, the weird thing that the code works when I run it in an unit test:
require 'openssl'
require 'test/unit'
class TestCertificate < Test::Unit::TestCase
....
def test_load_cert
cert = OpenSSL::X509::Certificate.new(File.read(@cert_file))
assert_equal("Fri Aug 24 01:55:30 20011", cert.not_before.asctime)
....
end
end
Hi,
I'm getting an argument error within a Rails (3.1.7) Application when I do this: .... cert = OpenSSL::X509::Certificate.new(File.read(cert_file)) ....
The error mesage is: wrong number of arguments (1 for 0)
But, the weird thing that the code works when I run it in an unit test: require 'openssl' require 'test/unit'
class TestCertificate < Test::Unit::TestCase .... def test_load_cert cert = OpenSSL::X509::Certificate.new(File.read(@cert_file)) assert_equal("Fri Aug 24 01:55:30 20011", cert.not_before.asctime) .... end end
I'm using JRuby v1.6.7.2 and jruby-openssl v0.7.7
Thanks.