Skip to content

Instantly share code, notes, and snippets.

[0x00007fd00e449505] ReservedCodeSpace::ReservedCodeSpace(unsigned long, unsigned long, bool)+0x75
[0x00007fd00e0321fb] CodeHeap::reserve(unsigned long, unsigned long, unsigned long)+0xdb
[0x00007fd00dec02d0] codeCache_init()+0x80
[0x00007fd00e05352c] init_globals()+0x3c
(mmap: reserved=245760KB, committed=42304KB +15232KB)
[0x00007fd00e448459] ReservedSpace::ReservedSpace(unsigned long, unsigned long, bool, char*, unsigned long)+0x119
[0x00007fd00e245f9a] VirtualSpaceNode::VirtualSpaceNode(unsigned long)+0x16a
[0x00007fd00e24b005] VirtualSpaceList::create_new_virtual_space(unsigned long) [clone .part.163]+0x35
[0x00007fd00e24b3a0] VirtualSpaceList::expand_by(unsigned long, unsigned long)+0x270
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
require 'java'
java_import javax.crypto.Cipher
java_import java.security.NoSuchAlgorithmException
public class Cloud {
public static void example(String s) {
System.out.println("static mymethod " + s);
}
interface MyMethod{
public void interfaceMethod(String s);
}
$ cd ~/workspace/jruby/ && git checkout 9.0.1.0 && ./mwn
$ cd ~ && rvm use system
$ export JRUBY_HOME=~/workspace/jruby/
$ export PATH=~/workspace/jruby/bin:$PATH
$ which jruby
/Users/jkutner/workspace/jruby/bin/jruby
@jkutner
jkutner / irb.sh-session
Last active August 29, 2015 14:19
JRuby 9k java spec version for jrubyc
$ jrubyc spec/sample_war/lib/ruby_one_nine.rb
Picked up JAVA_TOOL_OPTIONS: -Djava.specification.version=1.6
$ javap -v ruby_one_nine | grep "major"
Warning: Binary file ruby_one_nine contains spec.sample_war.lib.ruby_one_nine
major version: 50
$ jirb
jruby-1.7.19 :003 > File.new('spec/sample_war/lib/ruby_one_nine.class', 'r').read[6..7]
=> "\u00002"
@jkutner
jkutner / error
Created April 24, 2015 17:54
error from jrubyc in warbler
NameError: missing class or uppercase package name (`org.jruby.compiler.impl.StandardASMCompiler'), caused by (NameError) cannot load Java class org.jruby.compiler.impl.StandardASMCompiler
get_proxy_or_package_under_package at org/jruby/javasupport/JavaUtilities.java:54
method_missing at file:/home/travis/.rvm/gems/jruby-9.0.0.0.pre1/gems/jruby-jars-9.0.0.0.pre1/lib/jruby-core-9.0.0.0.pre1.jar!/jruby/java/java_package_module_template.rb:14
(root) at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jruby/compiler.rb:10
(root) at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
require at org/jruby/RubyKernel.java:954
require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
(root) at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jruby/jrubyc.rb:
@jkutner
jkutner / gist:b36b09a5e04601ff2191
Last active August 29, 2015 14:18
Warbler on JRuby 9k

Getting Warbler ready for JRuby 9k is a good opportunity to do some major refactoring. This is a list of issues I'd like to address as part of a Warbler 2.x release:

  • Remove all references to Merb
  • Remove support for Rails 2.x
  • Remove support for Rails 3.x (continue support on the Warbler 1.4.x line)
  • Remove support for Ruby 1.8 (yes, it's still there), 1.9, 2.0
  • Improve compiled feature to support 2.2 compat version (see #312)
  • Remove Winstone? (make way for tomcat?)
$ JRUBY_OPTS=--2.0 bundle
Fetching gem metadata from https://rubygems.org/.Retrying dependency api due to error (2/3): Bundler::MarshalError ArgumentError: marshal data too short
Retrying dependency api due to error (3/3): Bundler::MarshalError ArgumentError: marshal data too short
Installing rack 1.5.2
Using bundler 1.7.9
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
@jkutner
jkutner / Gemfile.rb
Last active August 29, 2015 14:10
JRuby and Puma
gem "puma", "2.10.2"
$ heroku config:set MY_VAR="language: bash
>
> branches:
> only:
> - master
> "
Setting config vars and restarting jkutner-test... done, v4
MY_VAR: language: bash
branches: