Setup your Ruby environment
To be able to run Wasmer inside our Ruby application, we will need Ruby to be installed in our system.
The easiest way to get Ruby in your system is to follow the official documentation.
To ensure it is installed, let's run the following:
1
ruby --version # This will show the Ruby version
Copied!
If this command works, Ruby is successfully installed!

Start a Ruby project

Now it's time to create a new project and add Wasmer as a dependency:
1
mkdir wasmer-project
2
cd wasmer-project
Copied!
You can now prepare your Gemfile:
1
source 'https://rubygems.org'
2
gem 'wasmer'
Copied!
And install everything using Bundler:
1
bundle install
Copied!
Note that you can also install the Wasmer gem directly without using Bundler:
1
gem install wasmer
Copied!
Next, let's take a look at some examples!
Last modified 24d ago
Copy link