# RVM macruby install procedure needs improvement

**URL:** <https://www.ruby-forum.com/t/rvm-macruby-install-procedure-needs-improvement/193604>\
**Category:** Ruby\
**Created:** [August 20, 2010, 12:38pm UTC](https://www.ruby-forum.com/t/rvm-macruby-install-procedure-needs-improvement/193604 "2010-08-20T12:38:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [August 20, 2010, 12:38pm UTC](https://www.ruby-forum.com/t/rvm-macruby-install-procedure-needs-improvement/193604/1 "2010-08-20T12:38:51Z")

</div>

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](https://llvm.org/svn/llvm-project/llvm/trunk)  
llvm-trunk)

_Now this could have been on the Macruby install page to make things  
easier_.

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

1. 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  
all.

2. 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:

/Users/rahul/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rubygems.rb:340:in  
`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.

1. 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  
/Users/rahul/.rvm/src/macruby-head/lib/fileutils.rb:1420:in  
`fu_each_src_dest0:': Permission denied - (../../../Library/Frameworks/MacRuby.framework/Versions/Current/usr/bin/macgem, /usr/local/bin/macgem) (Errno::EACCES) from /Users/rahul/.rvm/src/macruby-head/lib/fileutils.rb:342:in `symlink:’  
from /Users/rahul/.rvm/src/macruby-head/instruby.rb:3:in  
`’  
rake aborted!  
Command failed with status (1): [./miniruby instruby.rb  
–make="/usr/bin/ma…]

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

1. 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 ?

thanks.

---

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [August 20, 2010, 4:43pm UTC](https://www.ruby-forum.com/t/rvm-macruby-install-procedure-needs-improvement/193604/2 "2010-08-20T16:43:57Z")

</div>

R… Kumar 1.9.1 OSX wrote:

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

[http://www.ruby-lang.org/en/news/2010/08/18/ruby-1-9-2-is-released/](http://www.ruby-lang.org/en/news/2010/08/18/ruby-1-9-2-is-released/)

"FAQ

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  
directory."

---

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [August 20, 2010, 5:22pm UTC](https://www.ruby-forum.com/t/rvm-macruby-install-procedure-needs-improvement/193604/3 "2010-08-20T17:22:02Z")

</div>

Brian C. wrote:

> R… Kumar 1.9.1 OSX wrote:
> 
> > (WHy is it complaining about **1.9.1** inside 1.9.2 ???)
> 
> [http://www.ruby-lang.org/en/news/2010/08/18/ruby-1-9-2-is-released/](http://www.ruby-lang.org/en/news/2010/08/18/ruby-1-9-2-is-released/)
> 
> "FAQ
> 
> 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  
> directory."

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’

* * *

I’ve tried to leave a message on [irc.freenode.net](http://irc.freenode.net) but am totally lost –  
never used IRC before.

---

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [August 20, 2010, 7:40pm UTC](https://www.ruby-forum.com/t/rvm-macruby-install-procedure-needs-improvement/193604/4 "2010-08-20T19:40:52Z")

</div>

Brian C. wrote:

> > Also, i tried copying the files from  
> > /Library/Frameworks/MacRuby.framework/Versions/0.7/usr/bin/ to  
> > /usr/local/bin
> 
> 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.

Cheers.

---

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [August 20, 2010, 6:21pm UTC](https://www.ruby-forum.com/t/rvm-macruby-install-procedure-needs-improvement/193604/5 "2010-08-20T18:21:26Z")

</div>

R… Kumar 1.9.1 OSX wrote:

> > > (WHy is it complaining about **1.9.1** inside 1.9.2 ???)
> > 
> > [http://www.ruby-lang.org/en/news/2010/08/18/ruby-1-9-2-is-released/](http://www.ruby-lang.org/en/news/2010/08/18/ruby-1-9-2-is-released/)
> > 
> > "FAQ
> > 
> > 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  
> > directory."
> 
> 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  
> /usr/local/bin

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