Permalink
Browse files

file encoding should be utf8 for jruby

  • Loading branch information...
1 parent 66bb94d commit 5b31c70b2cac13578ee25e8b1f991dd45cec5a1e @hone hone committed Jan 11, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/language_pack/ruby.rb
@@ -33,7 +33,7 @@ def default_config_vars
"GEM_PATH" => slug_vendor_base,
}
- ruby_version_jruby? ? vars.merge("JRUBY_HOME" => slug_vendor_jruby, "JAVA_OPTS" => '-Xmx384m -Xss512k -XX:+UseCompressedOops') : vars
+ ruby_version_jruby? ? vars.merge("JRUBY_HOME" => slug_vendor_jruby, "JAVA_OPTS" => default_java_opts) : vars
end
def default_process_types
@@ -106,6 +106,12 @@ def ruby_version_jruby?
ruby_version ? ruby_version.match(/^jruby-/) : false
end
+ # default JAVA_OPTS
+ # return [String] string of JAVA_OPTS
+ def default_java_opts
+ '-Xmx384m -Xss512k -XX:+UseCompressedOops -Dfile.encoding=UTF-8'
+ end
+
# list the available valid ruby versions
# @note the value is memoized
# @return [Array] list of Strings of the ruby versions available
@@ -198,6 +204,7 @@ def setup_ruby_install_env
end
if ruby_version_jruby?
ENV['JRUBY_HOME'] = slug_vendor_jruby
+ ENV['JAVA_OPTS'] = default_java_opts
end
end

0 comments on commit 5b31c70

Please sign in to comment.