wasmerio / wasmer-ruby

💎🕸 WebAssembly runtime for Ruby
https://wasmer.io
MIT License
465 stars 18 forks source link

Install fails on Ruby 3.0.1 #46

Closed jakub-stastny closed 3 years ago

jakub-stastny commented 3 years ago

Describe the bug

RubyGems install of wasmer 0.4.0 fails on Ruby 3.0.1.

(NOTE: Ruby 3 has been released as stable in December.)

Steps to reproduce

  1. gem install wasmer (on Ruby 3.0.1).
  2. See error

Expected behavior

Install the package and not to fail.

Actual behavior

gem install wasmer
Building native extensions. This could take a while...                                                                              
ERROR:  Error installing wasmer:                                                                                                    
        ERROR: Failed to build gem native extension.
    current directory: /opt/rubies/ruby-3.0.1/lib/ruby/gems/3.0.0/gems/wasmer-0.4.0/opt/rubies/ruby-3.0.1/bin/ruby -I/opt/rubies/ruby-3.0.1/lib/ruby/3.0.0 -rrubygems /opt/rubies/ruby-3.0.1/lib/ruby/gems/3.0.0/gems/r
ake-13.0.3/exe/rake RUBYARCHDIR\=/opt/rubies/ruby-3.0.1/lib/ruby/gems/3.0.0/extensions/x86_64-linux/3.0.0-static/wasmer-0.4.0 RUBYLI
BDIR\=/opt/rubies/ruby-3.0.1/lib/ruby/gems/3.0.0/extensions/x86_64-linux/3.0.0-static/wasmer-0.4.0
fatal: not a git repository (or any of the parent directories): .git
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application
for all non-root users on this machine.
fatal: not a git repository (or any of the parent directories): .git
Fetching gem metadata from https://rubygems.org/...
Resolving dependencies...
Using rake 13.0.3
Using ansi 1.5.0
Using builder 3.2.4
Using bundler 2.2.15
Using minitest 5.14.4
Using ruby-progressbar 1.11.0
Using minitest-reporters 1.4.3
Using color_pound_spec_reporter 0.0.9
Using rutie 0.0.4
Using wasmer 0.4.0 from source at `.`
Bundle complete! 6 Gemfile dependencies, 10 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
cargo build --release
rake aborted!
Command failed with status (127): [cargo build --release...]

Tasks: TOP => default => test => build_lib
(See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in /opt/rubies/ruby-3.0.1/lib/ruby/gems/3.0.0/gems/wasmer-0.4.0 for inspection.
Results logged to /opt/rubies/ruby-3.0.1/lib/ruby/gems/3.0.0/extensions/x86_64-linux/3.0.0-static/wasmer-0.4.0/gem_make.out
jakub-stastny commented 3 years ago

I didn't have Rust installed. It's not really clear in the README as nothing was mentioned in the installation section. I submitted a PR in order to make the README clearer.

After that unfortunately I still can't compile, I see the bug #42.