Migrating an application from rails2 to rails3 and i am facing an error can't convert String into Integer
in crypt/blowfish.
config/core_ext/string.rb file:
def encrypt(key) <br/>
blowfish = Crypt::Blowfish.new(key)
blowfish.encrypt_string(self)
end
The method called from test/unit/core_ext/string_test.rb
def test_encryption
key = "test"
encrypted = str.encrypt(key)
end
How to fix this issue? Any help would be appreciated.
Apparently there are problems with Blowfish in Ruby 1.9+. You can update the blowfish gem or use gist.