Skip to content

Instantly share code, notes, and snippets.

@rawsyntax
Created January 29, 2010 16:38
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save rawsyntax/289868 to your computer and use it in GitHub Desktop.
Save rawsyntax/289868 to your computer and use it in GitHub Desktop.
~$ ARCHFLAGS='-arch i386 -arch x86_64'
~$ rvm install 1.8.7 --debug --reconfigure -C --enable-shared=yes
~$ wget http://sourceforge.net/projects/rubycocoa/files/RubyCocoa/1.0.0/RubyCocoa-1.0.0.tar.gz/download
~$ tar xzf RubyCocoa-1.0.0.tar.gz && rm RubyCocoa-1.0.0.tar.gz && cd RubyCocoa-1.0.0
~/RubyCocoa-1.0.0$ ruby install.rb config --build-universal=yes
~/RubyCocoa-1.0.0$ ruby install.rb setup
~/RubyCocoa-1.0.0$ sudo ruby install.rb install
@ionas
Copy link

ionas commented Dec 15, 2010

Thank you!

@ionas
Copy link

ionas commented Dec 15, 2010

When doing rvm install 1.9.2 --debug --reconfigure -C --enable-shared=yes
...
it fails like this:

USERNAME@HOSTNAME: ~/RubyCocoa-1.0.0 $ ruby install.rb config --build-universal=yes
install.rb: entering config phase...
create ext/rubycocoa/extconf.rb
create framework/GeneratedConfig.xcconfig
create framework/src/objc/Version.h
create tests/Makefile
---> framework
create /Users/USERNAME/RubyCocoa-1.0.0/framework/src/objc/osx_ruby.h ...
config failed
hook /Users/USERNAME/RubyCocoa-1.0.0/framework/post-config.rb failed:
No such file or directory - /Users/USERNAME/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/x86_64-darwin10.5.0/ruby.h
try 'ruby install.rb --help' for usage
USERNAME@HOSTNAME: ~/RubyCocoa-1.0.0 $

@tymyshoe
Copy link

Thank you! Worked perfectly.

@ionas
Copy link

ionas commented Dec 28, 2010

Works with 1.8.7-p330 too.

@coryschires
Copy link

Thanks. Worked for me.

@mschueler
Copy link

I'm getting the same error as you ionas. with 1.9.2

@ionas
Copy link

ionas commented Jun 14, 2011

Hello,

its long ago and I try to remember, was this required for LiveReload? If thats the case the solution I found weeks later was to use OS Xs system RubyCOCOA e.g. somehow tell RVM to use that system GEM instead of a RVM one. But thats all I remember sorry :E

@zerodie
Copy link

zerodie commented Jul 18, 2011

Hello,
I'm getting the same error as ionas and mschueler with 1.9.2, and now I resolve this problem finally.
We need to use system ruby when using livereload. (you can use two consoles: one with ruby-1.9.2 and another use system ruby)

step1. $ use rvm system
step2. run commands above:
~$ ARCHFLAGS='-arch i386 -arch x86_64'
~$ rvm install 1.8.7 --debug --reconfigure -C --enable-shared=yes
~$ wget http://sourceforge.net/projects/rubycocoa/files/RubyCocoa/1.0.0/RubyCocoa-1.0.0.tar.gz/download
~$ tar xzf RubyCocoa-1.0.0.tar.gz && rm RubyCocoa-1.0.0.tar.gz && cd RubyCocoa-1.0.0
~/RubyCocoa-1.0.0$ ruby install.rb config --build-universal=yes
~/RubyCocoa-1.0.0$ ruby install.rb setup
~/RubyCocoa-1.0.0$ sudo ruby install.rb install

step3. back to home dir
step4. $ livereload
step5. open another console and $rvm use ruby-1.9.2
and modify file you want.

@rawsyntax
Copy link
Author

RubyCocoa is not 1.9.x compatible.

I got livereload working by using the guard-livereload and rb-fsevent gems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment