Skip to content

Instantly share code, notes, and snippets.

@windix
Created April 13, 2012 11:13
Show Gist options
  • Save windix/2375962 to your computer and use it in GitHub Desktop.
Save windix/2375962 to your computer and use it in GitHub Desktop.
Mac OS X tips

Mac OS X tips

my version

Mac OS X 10.6.8 (Leopard) 32 bit

ruby -e 'puts RUBY_PLATFORM'
i386-darwin10.8.0

Setup path for brew

cat /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/local/sbin
/usr/sbin
/sbin

Upgrade brew

git fetch origin
git reset --hard origin/master
git clean -f

rvm: clean gems

rvm gemset clean

Make libv8 gem working

https://github.com/cowboyd/libv8

doesn't ship with my platform :(

and even worse:

It appears that the platform string for ruby 1.8.7 on 64bit Snow Leopard, is the same as ruby 1.9.2 on a 32 bit snow leopard.

solution from: rubyjs/therubyracer#127 (comment)

  1. so install it from source: http://rubygems.org/downloads/libv8-3.3.10.4.gem and it will be installed to /Users/wfeng/.rvm/gems/ruby-1.9.3-p125/gems/libv8-3.3.10.4/

  2. install therubyracer it will install(!) another libv8 gem into /Users/wfeng/.rvm/gems/ruby-1.9.3-p125/gems/libv8-3.3.10.4-x86-darwin-10/lib/libv8/build/v8 note the difference: libv8-3.3.10.4 vs libv8-3.3.10.4-x86-darwin-10

  3. delete /Users/wfeng/.rvm/gems/ruby-1.9.3-p125/gems/libv8-3.3.10.4-x86-darwin-10/

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