We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents aa7483e + a1dd6b9 commit 0b87affCopy full SHA for 0b87aff
packages/npm-packages/ruby-wasm-wasi/src/vm.ts
@@ -132,7 +132,12 @@ export class RubyVM {
132
vm.addToImports(imports);
133
options.addToImports?.(imports);
134
const instance = await WebAssembly.instantiate(module, imports);
135
- await vm.setInstance(instance);
+ try {
136
+ await vm.setInstance(instance);
137
+ } catch (e) {
138
+ console.error("Failed to instantiate Ruby VM. Please make sure that you have added `gem \"js\"` to your Gemfile.");
139
+ throw e;
140
+ }
141
options.setMemory?.(instance.exports.memory as WebAssembly.Memory);
142
wasip1.initialize(instance);
143
vm.initialize(options.args);
0 commit comments