使用libv8和rails捆绑安装问题 [英] bundle install issue with libv8 and rails

查看:91
本文介绍了使用libv8和rails捆绑安装问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用ruby 1.9.3p0(2011-10-30修订版33570)[x86_64-darwin10.8.0]时遇到 libv8 gem问题。 gem install libv8可以正常工作,而且我有

  gem'therubyracer'
Gemfile 中有pre>

,这依赖于 libv8 当我做一个 bundle install时安装

 
$ bundle exec gem列表

***本地GEMS ***

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

但是当我运行:

 
$ rails s
无法在任何源代码中找到libv8-3.3.10.4
运行`bundle安装`来安装缺失的宝石。

它找不到 libv8 - 这是32/64位问题?如果是这样,我该如何解决它?

解决方案

我怀疑这是因为我有32/64位不匹配。 p>

我解决了这个问题:

 
$ irb
ruby​​- 1.9.3-p0:001>`gem list`.each_line {| line | `sudo env ARCHFLAGS = - arch x86_64gem install#{line.split.first}`


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?

解决方案

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}`

这篇关于使用libv8和rails捆绑安装问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆