Just to weigh in on this, I found step 3 did the trick. Aw, Goatley. On 2011-06-29, at 10:25 PM, Mark Rada wrote:
I don't actually use rvm to build HEAD, since I have my llvm setup differently and because I have other changes to MacRuby; however, I do use HEAD with rvm.
The trick is that rvm sets up macruby a little differently, and that macruby-nightly and macruby-head would be installed to the same place anyways.
Steps:
1. install macruby-nightly using rvm so that rvm sets up paths, directories, symlinks, etc. that rvm wants for gemsets and like
2. build macruby HEAD without rvm and then install it
3. sacrifice a goat under the full moon
4. tell rvm to use macruby-nightly, except that it will really be symlinked to macruby-head
Note that you will need to re-install macruby-nightly through rvm each time the macruby version number gets bumped to fix the symlinks again. Also, step 3 is optional. Other than that, it should be smooth sailing.
Mark Rada mrada@marketcircle.com
On 2011-06-29, at 2:44 PM, Matt Aimonetti wrote:
I don't use rvm for MacRuby but Mark does, maybe he can help ;)
- Matt
On Wed, Jun 29, 2011 at 11:22 AM, Eric Christopherson <echristopherson@gmail.com> wrote: [I posted this question to the RVM group a few days ago, but haven't heard back. I know MacRuby users don't tend to use it with RVM, but I'd like to make this work, since I have had trouble running "system" MacRuby commands like macgem -- they pick up environment variables set by RVM and end up doing things like installing/looking for gems in the wrong places.]
---------- Forwarded message ---------- From: Eric Christopherson <echristopherson@gmail.com> Date: Mon, Jun 27, 2011 at 12:04 AM Subject: Installing MacRuby HEAD To: rubyversionmanager@googlegroups.com
I'm new to this group (hi!). Yesterday I built MacRuby from HEAD, outside of RVM, and it worked fine. There was a small complication in that I have a 32-bit Mac, so I built it with rake archs=i386.
Now I'm trying to do the same from within RVM. The first complication was that I had 'export rvm_make_flags="-j 3"' in my ~/.rvmrc. When building MacRuby, rake picks up rvm_make_flags, which causes it to error out because it doesn't recognize -j. So I commented that line out of .rvmrc.
Next, I found that whatever I tried, RVM would not call rake with archs=i386, so it was targeting x86_64. I fixed this by editing ~/.rvm/scripts/functions/manage/macruby, changing 'rvm_ruby_make="rake"' to 'rvm_ruby_make="rake jobs=3 archs=i386"'.
This seemed to build MacRuby just fine, but failed to install RubyGems afterward. Here is the output I get from rvm install macruby-head: <shell transcript> $ rvm install macruby-head Installing Ruby from source to: /Users/eric/.rvm/rubies/macruby-head, this may take a while depending on your cpu(s)...
macruby-head - #fetching HEAD is now at e994638 add Pointer#to_object which returns the pointer address as a true object, to use only in certain circumstances From https://github.com/MacRuby/MacRuby * branch master -> FETCH_HEAD Already up-to-date. Already on 'master' Copying from repo to src path... macruby-head - #compiling macruby-head - #installing Password: Removing old Rubygems files... Installing rubygems dedicated to macruby-head... Installing rubygems for /Users/eric/.rvm/rubies/macruby-head/bin/ruby ERROR: Error running 'GEM_PATH="/Users/eric/.rvm/gems/macruby-head:/Users/eric/.rvm/gems/macruby-head@global:/Users/eric/.rvm/gems/macruby-head:/Users/eric/.rvm/gems/macruby-head@global" GEM_HOME="/Users/eric/.rvm/gems/macruby-head" "/Users/eric/.rvm/rubies/macruby-head/bin/ruby" "/Users/eric/.rvm/src/rubygems-1.6.2/setup.rb"', please read /Users/eric/.rvm/log/macruby-head/rubygems.install.log WARN: Installation of rubygems did not complete successfully. ln: /Users/eric/.rvm/rubies/macruby-head/lib/ruby/gems/: No such file or directory ERROR: Error running 'chmod +x /Users/eric/.rvm/rubies/macruby-head/bin/*', please read /Users/eric/.rvm/log/macruby-head/chmod.bin.log macruby-head - adjusting #shebangs for (gem irb erb ri rdoc testrb rake). cp: /Users/eric/.rvm/rubies/macruby-head/bin/gem: No such file or directory chmod: /Users/eric/.rvm/rubies/macruby-head/bin/gem: No such file or directory cp: /Users/eric/.rvm/rubies/macruby-head/bin/irb: No such file or directory chmod: /Users/eric/.rvm/rubies/macruby-head/bin/irb: No such file or directory cp: /Users/eric/.rvm/rubies/macruby-head/bin/ri: No such file or directory chmod: /Users/eric/.rvm/rubies/macruby-head/bin/ri: No such file or directory cp: /Users/eric/.rvm/rubies/macruby-head/bin/rdoc: No such file or directory chmod: /Users/eric/.rvm/rubies/macruby-head/bin/rdoc: No such file or directory cp: /Users/eric/.rvm/rubies/macruby-head/bin/rake: No such file or directory chmod: /Users/eric/.rvm/rubies/macruby-head/bin/rake: No such file or directory macruby-head - #importing default gemsets (/Users/eric/.rvm/gemsets/) Install of macruby-head - #complete /Users/eric/.rvm/scripts/functions/manage/macruby: line 110: /Users/eric/.rvm/rubies/macruby-head/bin/erb: No such file or directory chmod: /Users/eric/.rvm/rubies/macruby-head/bin/erb: No such file or directory /Users/eric/.rvm/scripts/functions/manage/macruby: line 110: /Users/eric/.rvm/rubies/macruby-head/bin/gem: No such file or directory chmod: /Users/eric/.rvm/rubies/macruby-head/bin/gem: No such file or directory /Users/eric/.rvm/scripts/functions/manage/macruby: line 110: /Users/eric/.rvm/rubies/macruby-head/bin/irb: No such file or directory chmod: /Users/eric/.rvm/rubies/macruby-head/bin/irb: No such file or directory /Users/eric/.rvm/scripts/functions/manage/macruby: line 110: /Users/eric/.rvm/rubies/macruby-head/bin/rake: No such file or directory chmod: /Users/eric/.rvm/rubies/macruby-head/bin/rake: No such file or directory /Users/eric/.rvm/scripts/functions/manage/macruby: line 110: /Users/eric/.rvm/rubies/macruby-head/bin/rdoc: No such file or directory chmod: /Users/eric/.rvm/rubies/macruby-head/bin/rdoc: No such file or directory /Users/eric/.rvm/scripts/functions/manage/macruby: line 110: /Users/eric/.rvm/rubies/macruby-head/bin/ri: No such file or directory chmod: /Users/eric/.rvm/rubies/macruby-head/bin/ri: No such file or directory /Users/eric/.rvm/scripts/functions/manage/macruby: line 110: /Users/eric/.rvm/rubies/macruby-head/bin/ruby: No such file or directory chmod: /Users/eric/.rvm/rubies/macruby-head/bin/ruby: No such file or directory /Users/eric/.rvm/scripts/functions/manage/macruby: line 110: /Users/eric/.rvm/rubies/macruby-head/bin/testrb: No such file or directory chmod: /Users/eric/.rvm/rubies/macruby-head/bin/testrb: No such file or directory $ rvm list
rvm rubies
jruby-1.6.2 [ darwin-i386-java ] ruby-1.8.7-p334 [ i386 ] => ruby-1.9.2-p180 [ i386 ]
$ ll -R /Users/eric/.rvm/rubies/macruby-head total 0 drwxr-xr-x 3 eric staff 102 Jun 26 13:30 lib/
/Users/eric/.rvm/rubies/macruby-head/lib: total 0 drwxr-xr-x 2 eric staff 68 Jun 26 13:30 ruby/
/Users/eric/.rvm/rubies/macruby-head/lib/ruby: </shell transcript>
I've taken all my macruby-head logs and put them at <https://github.com/echristopherson/macruby-head>.
So, I'd like to know: 1. What I need to do to get macruby-head installed; and 2. Whether it would be possible for RVM to be modified to allow .rvmrc to specify build settings separately for different implementations, so that e.g. it doesn't try to pass rvm_make_flags to rake as if it's make. It doesn't seem right to have to modify .rvmrc each time you compile something. _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel