RVM macruby install procedure needs improvement

  • Thread starter R.. Kumar 1.9.1 OSX
  • Start date


R.. Kumar 1.9.1 OSX

I could be doing something wrong, but this is how it went.

1. I try installing "rvm install macruby-head"
(I have not yet installed llvm since i am not sure what
version to use)

2. I get an error about not having LLVM. I go through source and find a
README.rdoc file which gives me the correct LLVM version.
( svn co -r 106781 https://llvm.org/svn/llvm-project/llvm/trunk

*Now this could have been on the Macruby install page to make things

I install LLVM. (It installs in /usr/local .. i don't have this in path
since i use macports)

3. Now the README.rdoc wants me to do "rake" and "sudo rake install".
I do rake, but then remember that RVM does not want me to do sudo at

4. So I resume: rvm install macruby-head

It prompts me for sudo password in order to do a "sudo rake install".

Here's the error i get:

`bin_path': can't find executable rake for rake-0.8.7 (Gem::Exception)
from /Users/rahul/.rvm/gems/ruby-1.9.2-head/bin/rake:19:in

(WHy is it complaining about **1.9.1** inside 1.9.2 ???)

When i do "sudo rake install" myself, i get the same error.

5. So now I do just "rake install". Seems to go well.

installing rdoc
installing binary commands
installing command scripts
installing library scripts
installing headers
installing manpages
installing data files
installing extension objects
installing extension scripts
installing Xcode 3.x templates
installing Xcode templates
installing samples
installing framework
`fu_each_src_dest0:': Permission denied -
/usr/local/bin/macgem) (Errno::EACCES)
from /Users/rahul/.rvm/src/macruby-head/lib/fileutils.rb:342:in
from /Users/rahul/.rvm/src/macruby-head/instruby.rb:3:in
rake aborted!
Command failed with status (1): [./miniruby instruby.rb

Oops. It needs sudo access, but in sudo access it won't have access to
my RVM ruby!!!

6. So now i don't have any executables.
I use mdfind and find that these executable seem to be lying around:

ls /Library/Frameworks/MacRuby.framework/Versions/0.7/usr/bin/

macgem* macrake* macri* macruby_deploy* macrubyc* rb_nibtool*
macirb* macrdoc* macruby* macruby_select* macrubyd*

So perhaps I need to just copy these into /usr/local/bin. Or somewhere
into RVM.

Could someone clarify what i should do now. Where did I go wrong ?
Why is rvm install failing ?




R.. Kumar 1.9.1 OSX

Brian said:


The standard library is installed in /usr/local/lib/ruby/1.9.1

This version number is "library compatibility version". Ruby 1.9.2 is
mostly compatible with the 1.9.1, so its library is installed in the

Just checked. I have no dir called ruby in /usr/local/lib.

Also, i tried copying the files from
/Library/Frameworks/MacRuby.framework/Versions/0.7/usr/bin/ to
/usr/local/bin and trying out "macirb". It won't load:

2010-08-20 20:43:06.702 macruby[75748:903] *** Terminating app due to
uncaught exception 'NoMethodError', reason: 'undefined method `split'
for nil:NilClass (NoMethodError)
*** Call stack at first throw:
0 CoreFoundation 0x00007fff80132cc4
__exceptionPreprocess + 180
1 libobjc.A.dylib 0x00007fff82ea20f3
objc_exception_throw + 45
2 libmacruby.dylib 0x0000000100154445
rb_vm_raise + 437
3 libmacruby.dylib 0x000000010003fdf9
rb_exc_raise + 9
4 libmacruby.dylib 0x0000000100151db6
rb_vm_method_missing + 566
5 libmacruby.dylib 0x0000000100141ab9
rb_vm_dispatch + 6841
6 libmacruby.dylib 0x0000000100144a54
rb_vm_yield_args + 3044
7 libmacruby.dylib 0x00000001001406a8
rb_vm_dispatch + 1704
8 deprecated.rbo 0x0000000102df2413
MREP_B11FADFC64CD4989998BA496E66B8860 + 2211
terminate called after throwing an instance of 'NSException'

Brian Candler

R.. Kumar 1.9.1 OSX said:
Just checked. I have no dir called ruby in /usr/local/lib.

I was just trying to answer your question as to why files are installed
into foo/lib/ruby/1.9.1 when you're building ruby 1.9.2.

When ruby is being built, it may be told to build somewhere other than
/usr/local. In your case it looks like rvm is building it under
/Users/rahul/.rvm/gems/ruby-1.9.2-head/. But the lib dir is still
intentionally .../1.9.1/...
Also, i tried copying the files from
/Library/Frameworks/MacRuby.framework/Versions/0.7/usr/bin/ to

I didn't mean that you should copy files anywhere else. Sorry if I
wasn't clear.



R.. Kumar 1.9.1 OSX

Brian said:
I didn't mean that you should copy files anywhere else. Sorry if I
wasn't clear.

My copying the files to /usr/local/bin was actually a continuation of my
first post wherein I mentioned that the files were created. In case
anyone reading got the impression my problem was solved, i was just
clarifying that the executables are not running.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question