RVM macruby install procedure needs improvement

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
    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:insymlink:’
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.

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/

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

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/

"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 but am totally lost –
never used IRC before.

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.

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/

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs