}
Blog about Ruby && JRuby stuff https://ivoanjo.me @knux
Text
}
1635 examples, 19 failures, 41 pending
Contacts
API
Contacts
Importer
Salesforce
Zendesk
NSA
???
export JRUBY_OPTS=--dev
bundle install --binstubs
gem 'pry-byebug',
platforms: :ruby
gem 'pry-debugger-jruby',
platforms: :jruby
export JRUBY_OPTS="--dev --debug"
gem 'multi_json'
gem 'oj', platforms: :ruby
gem 'jrjackson', platforms: :jruby
if RUBY_PLATFORM == 'java'
require 'jrjackson'
MultiJson.use :jr_jackson
else
require 'oj'
MultiJson.use :oj
end
./Gemfile:24: [gems, warning] Found gem 'oj' which is reported to have some issues: Try gson, json or json_pure instead. Try any one of the following JRuby-based servers: Trinidad, Mizuno, Kirk or Puma (though make sure to use the JRuby-native version of the gem). ./Gemfile:43: [gems, warning] Found gem 'bson_ext' which is reported to have some issues: bson_ext isn't used with JRuby. Instead, some native Java extensions are bundled with the bson gem. ./app/controllers/api/user_controller.rb:25: [nonatomic, warning] Non-local operator assignment is not guaranteed to be atomic
https://ivoanjo.me/blog/2017/08/12/ninjas-guide-to-visualvm/
google: "ninjas guide visualvm"
(including JRuby goodies!!!)
$ jmap -histo 17118 | grep rubyobj
17: 9000 288000 rubyobj.Example.A
337: 98 3136 rubyobj.Gem.Requirement
435: 52 1664 rubyobj.Gem.Dependency
470: 42 1344 rubyobj.OtherStuff.B
477: 41 1312 rubyobj.Gem.Version
762: 13 416 rubyobj.Gem.Specification
1103: 6 192 rubyobj.Gem.Platform
4060: 1 32 rubyobj.Gem.PathSupport
4061: 1 32 rubyobj.Gem.StubSpecification
4062: 1 32 rubyobj.Gem.StubSpecification.StubLine
4063: 1 32 rubyobj.Monitor
export JRUBY_OPTS="-Xreify.classes=true"
export JRUBY_OPTS=\ "-Xcompile.invokedynamic=true -Xmanagement.enabled=true"
(e.g. Heroku 1x or 2x)
LOTS MORE JRUBY!