Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/npm-packages/ruby-head-wasm-wasip2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"README.md"
],
"scripts": {
"FIXME_SKIP_test": "RUBY_NPM_PACKAGE_ROOT=../ruby-head-wasm-wasip2 ENABLE_COMPONENT_TESTS=1 npm -C ../ruby-wasm-wasi run test:run",
"test": "RUBY_NPM_PACKAGE_ROOT=../ruby-head-wasm-wasip2 ENABLE_COMPONENT_TESTS=1 npm -C ../ruby-wasm-wasi run test:run",
"build:deps": "cd ../ruby-wasm-wasi && npm run build",
"build:static:files": "../ruby-wasm-wasi/tools/pack-static-files.sh ./dist",
"build:static": "npm run build:static:files",
Expand Down
5 changes: 5 additions & 0 deletions packages/npm-packages/ruby-wasm-wasi/src/vm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,11 @@ export class RubyVM {
this.eval(`
# Require Bundler standalone setup
if File.exist?("/bundle/bundler/setup.rb")
# Some ruby-head + ruby.wasm revisions return from rubyInit with a partial
# Gem module: Gem is defined, but RubyGems is not loaded yet and its API
# helpers are still missing. Bundler standalone treats defined?(Gem) as
# sufficient, so load RubyGems explicitly before requiring its setup file.
require "rubygems" if defined?(Gem) && !Gem.respond_to?(:ruby_api_version)
require "/bundle/bundler/setup.rb"
elsif File.exist?("/bundle/setup.rb")
# For non-CM builds, which doesn't use Bundler's standalone mode
Expand Down
Loading