I am trying to build the example gem from here following the mruby documentation for building gems.
I'm on a Mac OS Catalina, and I have installed RVM to manage my installation mruby. Right now which ruby
returns /Users/mdorier/.rvm/rubies/mruby-2.0.1/bin/ruby
so I can see that mruby is used.
The example gem above has an mrbgem.rake file, so even though the documentation doesn't explain how to build the gem, I suppose rake
should be invoked in that directory. I didn't have rake installed, so I tried to install it with gem install rake
, but it seems that Mac OS's native gem
executable in /usr/bin got invoked, apparently installing the normal ruby's rake gem. When I call that rake, it doesn't find a Rakefile in the directory. If I specify rake -f mrbgem.rake
, it tells me NameError: uninitialized constant MRuby
.
I see that mruby doesn't have a gem command but seems to have a mgem that can be installed with gem. I installed it. I see that there is a mruby-rake
mgem available, which I activated using mgem add mruby-rake
, but it doesn't change what the rake
command points to.
Can someone explain how I can install and use the proper rake command to build this mruby gem?