Skip to content

Instantly share code, notes, and snippets.

@dmoulton
Created September 19, 2012 16:22
Show Gist options
  • Save dmoulton/3750586 to your computer and use it in GitHub Desktop.
Save dmoulton/3750586 to your computer and use it in GitHub Desktop.
Error in jruby 1.7.0preview2 but not in preview1
Using jruby 1.7.0preview2 I try to use IMGKit to create a file, I get:
╰─$ rails c
Loading development environment (Rails 3.2.3)
[1] pry(main)> kit = IMGKit.new("hello")
#<IMGKit:0x0000683c
attr_accessor :source = #<IMGKit::Source:0x00006840
@source = "hello"
>,
attr_accessor :stylesheets = [],
attr_reader :options = {}
>
[2] pry(main)> file = kit.to_file('test.jpg')
Encoding::UndefinedConversionError: Input length = 1
from org/jruby/RubyIO.java:1400:in `write'
[3] pry(main)>
Using jruby1.7.0preview1 It creates the file fine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment