{"action":"created","issue":{"url":"https://api.github.com/repos/oracle/truffleruby/issues/1323","repository_url":"https://api.github.com/repos/oracle/truffleruby","labels_url":"https://api.github.com/repos/oracle/truffleruby/issues/1323/labels{/name}","comments_url":"https://api.github.com/repos/oracle/truffleruby/issues/1323/comments","events_url":"https://api.github.com/repos/oracle/truffleruby/issues/1323/events","html_url":"https://github.com/oracle/truffleruby/issues/1323","id":315319733,"node_id":"MDU6SXNzdWUzMTUzMTk3MzM=","number":1323,"title":"Getting a new rails project to work with truffle ruby - stuck on Concurrent::Hash","user":{"login":"andreimc","id":1446134,"node_id":"MDQ6VXNlcjE0NDYxMzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1446134?v=4","gravatar_id":"","url":"https://api.github.com/users/andreimc","html_url":"https://github.com/andreimc","followers_url":"https://api.github.com/users/andreimc/followers","following_url":"https://api.github.com/users/andreimc/following{/other_user}","gists_url":"https://api.github.com/users/andreimc/gists{/gist_id}","starred_url":"https://api.github.com/users/andreimc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreimc/subscriptions","organizations_url":"https://api.github.com/users/andreimc/orgs","repos_url":"https://api.github.com/users/andreimc/repos","events_url":"https://api.github.com/users/andreimc/events{/privacy}","received_events_url":"https://api.github.com/users/andreimc/received_events","type":"User","site_admin":false},"labels":[{"id":322138142,"node_id":"MDU6TGFiZWwzMjIxMzgxNDI=","url":"https://api.github.com/repos/oracle/truffleruby/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"pitr-ch","id":204460,"node_id":"MDQ6VXNlcjIwNDQ2MA==","avatar_url":"https://avatars2.githubusercontent.com/u/204460?v=4","gravatar_id":"","url":"https://api.github.com/users/pitr-ch","html_url":"https://github.com/pitr-ch","followers_url":"https://api.github.com/users/pitr-ch/followers","following_url":"https://api.github.com/users/pitr-ch/following{/other_user}","gists_url":"https://api.github.com/users/pitr-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/pitr-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitr-ch/subscriptions","organizations_url":"https://api.github.com/users/pitr-ch/orgs","repos_url":"https://api.github.com/users/pitr-ch/repos","events_url":"https://api.github.com/users/pitr-ch/events{/privacy}","received_events_url":"https://api.github.com/users/pitr-ch/received_events","type":"User","site_admin":false},"assignees":[{"login":"pitr-ch","id":204460,"node_id":"MDQ6VXNlcjIwNDQ2MA==","avatar_url":"https://avatars2.githubusercontent.com/u/204460?v=4","gravatar_id":"","url":"https://api.github.com/users/pitr-ch","html_url":"https://github.com/pitr-ch","followers_url":"https://api.github.com/users/pitr-ch/followers","following_url":"https://api.github.com/users/pitr-ch/following{/other_user}","gists_url":"https://api.github.com/users/pitr-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/pitr-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitr-ch/subscriptions","organizations_url":"https://api.github.com/users/pitr-ch/orgs","repos_url":"https://api.github.com/users/pitr-ch/repos","events_url":"https://api.github.com/users/pitr-ch/events{/privacy}","received_events_url":"https://api.github.com/users/pitr-ch/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-04-18T03:42:29Z","updated_at":"2018-06-01T07:37:01Z","closed_at":null,"author_association":"NONE","body":"API Only Mode:\r\n\r\nI build a docker image `docker run -it lusu777/truffle-ruby:1.0.0-rc1`\r\n\r\nhttps://github.com/andreimc/docker-images/tree/master\r\n\r\n`rails new api-play --api`\r\n\r\nOk so first go msgpack seems to error out -- this is because of bootsnap - let's try removing it\r\n\r\n```\r\nbundle exec rails s\r\n/usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/truffle/truffle/cext.rb:221:in `execute_without_conversion': Error in C extension code (SulongRuntimeException): (RuntimeError)\r\nCannot convert LLVMTruffleObject(LLVMTypedForeignObject:0) to LLVMAddress (IllegalStateException)\r\n        from msgpack_packer_ext_registry_init in packer_ext_registry.c:33:11 (LLVM IR Function msgpack_packer_ext_registry_init in /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/msgpack-1.2.4/lib/msgpack/msgpack.su@918828e71a73a3c14d873e477de87f2351d19bbc_out.bc in Block {id: 0 name: %0})\r\n        from Factory_initialize in factory_class.c:72:5 (LLVM IR Function Factory_initialize in /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/msgpack-1.2.4/lib/msgpack/msgpack.su@918828e71a73a3c14d873e477de87f2351d19bbc_out.bc in Block {id: 2name: %12})\r\n        from java.lang.Throwable.<init>(Throwable.java:287)\r\nCaused by:\r\nMessage not supported: TO_NATIVE (UnsupportedMessageException)\r\n        from java.lang.Throwable.<init>(Throwable.java:265)\r\n        from java.lang.Exception.<init>(Exception.java:66)\r\n        from com.oracle.truffle.api.interop.InteropException.<init>(InteropException.java:36)\r\n        from com.oracle.truffle.api.interop.UnsupportedMessageException.<init>(UnsupportedMessageException.java:41)\r\n        from com.oracle.truffle.api.interop.UnsupportedMessageException.raise(UnsupportedMessageException.java:68)\r\n        from org.truffleruby.interop.RubyMessageResolution$ForeignToNativeNode.access(RubyMessageResolution.java:192)\r\n        from org.truffleruby.interop.RubyMessageResolutionForeign$ForeignToNativeSubNode.accessWithTarget(RubyMessageResolutionForeign.java:503)\r\n        from org.truffleruby.interop.RubyMessageResolutionForeignFactory$ForeignToNativeSubNodeGen.executeAndSpecialize(RubyMessageResolutionForeignFactory.java:602)\r\n        from org.truffleruby.interop.RubyMessageResolutionForeignFactory$ForeignToNativeSubNodeGen.executeWithTarget(RubyMessageResolutionForeignFactory.java:588)\r\n        from org.truffleruby.interop.RubyMessageResolutionForeign$ForeignToNativeSubNode$TO_NATIVERootNode.execute(RubyMessageResolutionForeign.java:520)\r\nTranslated to internal error\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/truffle/truffle/cext.rb:221:in `execute_with_mutex'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/truffle/truffle/cext_ruby.rb:27:in `initialize'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/msgpack-1.2.4/lib/msgpack.rb:22:in `new'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/msgpack-1.2.4/lib/msgpack.rb:22:in `MessagePack'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/msgpack-1.2.4/lib/msgpack.rb:21:in `<top (required)>'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/store.rb:3:in `require'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/store.rb:3:in `block in <top (required)>'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/explicit_require.rb:40:in `with_gems'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/store.rb:3:in `<top (required)>'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache.rb:55:in `require_relative'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache.rb:55:in `<top (required)>'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap.rb:3:in `require_relative'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap.rb:3:in `<top (required)>'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/setup.rb:1:in `require_relative'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/setup.rb:1:in `<top (required)>'\r\n        from /my-rails-api/config/boot.rb:4:in `require'\r\n        from /my-rails-api/config/boot.rb:4:in `<top (required)>'\r\n        from bin/rails:3:in `require_relative'\r\n        from bin/rails:3:in `<main>'\r\n```\r\n\r\nvi Gemfile comment out gem 'bootsnap'\r\n\r\nvi config/boot.rb comment out require bootsnap/setuo\r\n\r\nok so next it's another issue: seems like concurrent.\r\n\r\nhttps://github.com/ruby-concurrency/concurrent-ruby/blob/ee2f78aab342c4193b33acd1f8c2f51f63a8b457/lib/concurrent/hash.rb\r\n\r\naccording to this it should work ... hmm next steps, monkey patch execution wrapper?\r\n\r\n```\r\nbash-4.2# export RUBY_ENGINE=truffleruby\r\nbash-4.2# bundle exec rails s\r\nPossibly unsupported Ruby implementation\r\n/usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/execution_wrapper.rb:102:in `const_missing': uninitialized constant Concurrent::Hash (NameError)\r\nDid you mean?  Hash\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/execution_wrapper.rb:102:in `ExecutionWrapper'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/execution_wrapper.rb:6:in `ActiveSupport'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/execution_wrapper.rb:5:in `<top (required)>'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/executor.rb:3:in `require'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/executor.rb:3:in `<top (required)>'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/application.rb:138:in `initialize'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/railtie.rb:167:in `new'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/railtie.rb:167:in `instance'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/application.rb:99:in `instance'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/railtie.rb:127:in `config'\r\n        from /my-rails-api/config/application.rb:23:in `Application'\r\n        from /my-rails-api/config/application.rb:21:in `MyRailsApi'\r\n        from /my-rails-api/config/application.rb:20:in `<top (required)>'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:145:in `require'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:145:in `block in perform'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in `tap'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in `perform'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `__send__'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/command/base.rb:65:in `perform'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/command.rb:46:in `invoke'\r\n        from /usr/graalvm-1.0.0-rc1/jre/languages/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.0/lib/rails/commands.rb:18:in `<top (required)>'\r\n        from bin/rails:4:in `require'\r\n        from bin/rails:4:in `<main>'\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/oracle/truffleruby/issues/comments/393793001","html_url":"https://github.com/oracle/truffleruby/issues/1323#issuecomment-393793001","issue_url":"https://api.github.com/repos/oracle/truffleruby/issues/1323","id":393793001,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Mzc5MzAwMQ==","user":{"login":"pitr-ch","id":204460,"node_id":"MDQ6VXNlcjIwNDQ2MA==","avatar_url":"https://avatars2.githubusercontent.com/u/204460?v=4","gravatar_id":"","url":"https://api.github.com/users/pitr-ch","html_url":"https://github.com/pitr-ch","followers_url":"https://api.github.com/users/pitr-ch/followers","following_url":"https://api.github.com/users/pitr-ch/following{/other_user}","gists_url":"https://api.github.com/users/pitr-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/pitr-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitr-ch/subscriptions","organizations_url":"https://api.github.com/users/pitr-ch/orgs","repos_url":"https://api.github.com/users/pitr-ch/repos","events_url":"https://api.github.com/users/pitr-ch/events{/privacy}","received_events_url":"https://api.github.com/users/pitr-ch/received_events","type":"User","site_admin":false},"created_at":"2018-06-01T07:37:01Z","updated_at":"2018-06-01T07:37:01Z","author_association":"MEMBER","body":"This is a problem in ConcurrentRuby, it will be fixed in next patch release."}}
{"actor":{"display_login":"pitr-ch"}}