Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bundle install issue with libv8 and rails

I'm having issues with the libv8 gem with ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0]. gem install libv8 works fine and I have

gem 'therubyracer'

in my Gemfile and this has a dependency on libv8 which is installed when I do a bundle install:

$ bundle exec gem list

*** LOCAL GEMS ***

actionmailer (3.1.3)
actionpack (3.1.3)
...
libv8 (3.3.10.4 x86_64-darwin-10)
...

but when I run:

$ rails s
Could not find libv8-3.3.10.4 in any of the sources
Run `bundle install` to install missing gems.

it can't find libv8 - is this is a 32/64 bit issue? If so, how do I solve it?

like image 983
outside2344 Avatar asked Oct 08 '22 21:10

outside2344


1 Answers

I suspect this was because I had a 32/64 bit mismatch.

I solved this with the following:

$ irb
ruby-1.9.3-p0 :001 > `gem list`.each_line {|line| `sudo env ARCHFLAGS="-arch x86_64" gem install #{line.split.first}`
like image 162
outside2344 Avatar answered Oct 12 '22 11:10

outside2344