This project is archived and is in readonly mode.
rails3 breaks base64 stdlib?
-
eydaimon
- Tag changed from base64 stdlib to base64, stdlib
-
Jens Fahnenbruck
- Tag changed from base64, stdlib to 1.9.1, base64, stdlib
+1 I can reproduce it in ruby 1.9.1 but it worked in ruby 1.8.7
-
isomorphix
I noticed the same thing, but it looks like this is a change between Ruby 1.8 and Ruby 1.9 and not a problem with Rails. According to the Ruby 1.9 Rdoc, that method does not exist, while the Ruby 1.8.6 Rdoc does have b64encode.
In addition, a plain irb session in Ruby 1.9.1-p378 behaves identically to what you experienced in the rails console. Rails is mentioned in the stack trace because you used the rails console instead of irb.
$ irb ruby-1.9.1-p378 > require 'base64' => true ruby-1.9.1-p378 > Base64.b64encode('blah') NoMethodError: undefined method `b64encode' for Base64:Module from (irb):2 from /Users/isomorphix/.rvm/rubies/ruby-1.9.1-p378/bin/irb:17:in `<main>' ruby-1.9.1-p378 > -
José Valim
- State changed from new to invalid
-
eydaimon
Jose:
please add some explanation why it was marked invalid?
It's pretty clear I'm not able to use it, regardless of what isomorphix said, and I hope you didn't close it only based on what he said.
i.e. I can use it just fine in irb, but it does not behave as expected in rails.