ruby-install icon indicating copy to clipboard operation
ruby-install copied to clipboard

mruby 1.2.0 fails

Open sunnyrjuneja opened this issue 10 years ago • 5 comments

Hi,

I'm trying to install mruby 1.2.0 (the latest version of mruby) on OS X 10.10.4.

λ →  ruby-install mruby 1.2.0>>> Installing mruby 1.2.0 into /Users/sunnyjuneja/.rubies/mruby-1.2.0 ...
>>> Installing dependencies for mruby 1.2.0 ...
Warning: bison-3.0.4 already installed
>>> Downloading https://github.com/mruby/mruby/archive/1.2.0/mruby-1.2.0.tar.gz into /Users/sunnyjuneja/src ...
>>> Verifying mruby-1.2.0.tar.gz ...
>>> Extracting mruby-1.2.0.tar.gz to /Users/sunnyjuneja/src/mruby-1.2.0 ...
>>> Cleaning mruby 1.2.0 ...
ruby ./minirake clean
trace:
    [0] ./minirake:7
./minirake:7: undefined method 'require' for main (NoMethodError)
make: *** [clean] Error 1
!!! Cleaning mruby 1.2.0 failed!

When I try to install mruby 1.1.0, it successfully completes. If there's anything I can do to improve this issue, let me know. Thanks for all your hard work. I find ruby-install very useful.

sunnyrjuneja avatar Jan 16 '16 03:01 sunnyrjuneja

Also, when I run clang -v, this is the output:

clang -v
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin14.4.0
Thread model: posix

sunnyrjuneja avatar Jan 16 '16 03:01 sunnyrjuneja

I just had the same problem because I'd installed mruby 1.0 with rvm before trying to install mruby-head. Switching my ruby version to MRI 2.2.1 fixed it for me.

xavriley avatar Feb 22 '16 21:02 xavriley

I also got "... ./minirake:7: undefined method 'require' for main ..." on android [via Gnuroot].

drhuffman12 avatar Apr 01 '16 23:04 drhuffman12

Ohhh to clarify @xavriley 's comment, the problem is that ./minirake is trying to use mruby but it should use "real" ruby.

I had to change my project to use "real" ruby with rbenv local 2.3.0

So for me, it was fixed by

~/my-project/mruby $ make 
ruby ./minirake
trace:
    [0] ./minirake:7
./minirake:7: undefined method 'require' for main (NoMethodError)
~/my-project/mruby $ cd .. 
~/my-project $ rbenv local 2.3.0 
~/my-project $ cd mruby 
~/my-project/mruby $ make 
# compile output

rmosolgo avatar Apr 04 '16 20:04 rmosolgo

Going to close this. mruby has since switched to a standard rake build system. I've just added ruby and rake as dependencies of mruby and now invoke rake instead of make to build mruby.

postmodern avatar Jan 14 '26 01:01 postmodern