Hola a todos. Estoy empezando a programar en ruby y me ha enganchado
muchisimo.
Este mensaje quizás no debÃa ir en este foro, ya que voy a hablar de
ruby puro y duro, pero como no he visto un foro de ruby en español lo
pongo aqui. Si molesta no vuelvo a poner ningun post.
El caso es que cuándo ejecuto el método: blowfish.encrypt_file
Si alguien pudiera hacer un gem install crypt y ver que puede estar
ocurriendo se lo agradecerÃa mucho. El caso es que actualizé a ruby 1.9
y me dejó de funcionar dando otros errores, por lo que reinstalé 1.8.6 y
me sale el siguiente error:
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:97
cryptFile = carefully_open_file(cryptFilename, ‘rb’)
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:76
begin
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:77
aFile = File.new(filename, mode)
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:83
return(aFile)
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:83
return(aFile)
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:98
plainFile = carefully_open_file(plainFilename, ‘wb+’)
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:76
begin
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:77
aFile = File.new(filename, mode)
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:83
return(aFile)
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:83
return(aFile)
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:99
decrypt_stream(cryptFile, plainFile)
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:59
chain = cryptStream.read(block_size())
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/blowfish.rb:18
return(8)
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/blowfish.rb:18
return(8)
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:61
while (block = cryptStream.read(block_size()))
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:61
while (block = cryptStream.read(block_size()))
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/blowfish.rb:18
return(8)
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/blowfish.rb:18
return(8)
Tracing(1):/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/crypt/cbc.rb:69
buffer = plainText.split(’’)
/usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/./crypt/cbc.rb:69:in
decrypt_stream': private method
split’ called for nil:NilClass
(NoMethodError)
from /usr/local/lib/ruby/gems/1.8/gems/crypt-1.1.4/./crypt/cbc.rb:99:in
`decrypt_file’
from blowfish1.rb:28