标签: libv8

在OS X 10.9+上安装libv8 gem

我正在尝试安装libv8 3.16.14.3,但使用最新的稳定rvm和ruby-1.9.3-p125在OSX Mavericks上出错.

这是运行命令'gem install libv8'的输出:

~/src(branch:master) » gem install libv8
Fetching: libv8-3.16.14.3.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
  ERROR: Failed to build gem native extension.

    /Users/me/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.5
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Unable to find a compiler officially supported by v8.
It is recommended to use GCC v4.4 or higher
Using compiler: g++
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Unable to find a compiler officially supported …
Run Code Online (Sandbox Code Playgroud)

gem rubygems libv8 osx-mavericks osx-yosemite

203
推荐指数
9
解决办法
8万
查看次数

安装libv8时出错:错误:无法构建gem本机扩展

我做了一个铁轨项目,

rails new test_bootstrap.
Run Code Online (Sandbox Code Playgroud)

成功了.

搬到了项目目录并添加了宝石

gem "therubyracer"
gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
gem "twitter-bootstrap-rails"
Run Code Online (Sandbox Code Playgroud)

并运行

bundle install
Run Code Online (Sandbox Code Playgroud)

之后,我有这个错误.

Installing libv8 (3.16.14.3)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile
??? ??? ?? ? ????.                                                          ??? ??? ?? ?
????.                                                          ??? ??? ?? ? ????.

c:/RailsInstaller/Ruby1.9.3/lib/ruby/ge
ms/1.9.1/gems/libv8-3.16.14.3/ext/libv8/builder.rb:58:in `setup_python!': libv8 requires
python 2 to be installed in order to build, but it is currently not available (RuntimeErr
or) from …
Run Code Online (Sandbox Code Playgroud)

ruby windows ruby-on-rails libv8

172
推荐指数
6
解决办法
9万
查看次数

therubyracer - Gem :: Ext :: BuildError:错误:无法构建gem原生扩展

我正在尝试在Mavericks上安装以下gem版本

  • libv8(3.16.14.3)
  • therubyracer(0.12.1)

显然,therubyracer宝石取决于libv8.

1)安装libv8

什么是libv8?我的一些研究似乎表明它是Google Chrome使用的某种javascript库?

我在安装它时遇到了麻烦,但是这个很棒的帖子既有我的错误,也有关于如何绕过它的解释清楚的答案.

所以我安装libv8

gem install libv8 -- --with-system-v8
Run Code Online (Sandbox Code Playgroud)

这是我的理解,这安装了gem,但使用我的本地系统安装v8库而不是... gem附带的版本?无论哪种方式,它都是成功的.

2)安装therubyracer

在下一步中,我在安装therubyracergem时遇到了麻烦.我不太确定这个gem是做什么的,只是因为它是我正在尝试的rails项目的依赖项bundle install.

它给了我以下错误:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /Users/jeeves.butler/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb 
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
checking for v8.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details. …
Run Code Online (Sandbox Code Playgroud)

ruby gcc therubyracer libv8 osx-mavericks

73
推荐指数
6
解决办法
4万
查看次数

宝石安装libv8 - 版本'3.11.8.17'在ruby(windows)上

问题如下.

Error installing libv8:
ERROR: Failed to build gem native extension.

    D:/Ruby193/bin/ruby.exe extconf.rb
    creating Makefile
    The system can not find the specified path

        D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:49:in'setup_python!':libv8 requires python 2 to be installed in order to build,but it is currently not available (RuntimeError)
             from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:35:in 'block in build_libv8!'
             from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in 'chdir'
             from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in 'build_libv8!'
             from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in 'install!'
             from extconf.rb:7: in '<main>'
I have installed the python27 and add the path.

python --version
Python 2.7.4
Run Code Online (Sandbox Code Playgroud)

然后我检查代码如下.

 def setup_python!
      # If python v2 cannot be …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails libv8

43
推荐指数
3
解决办法
3万
查看次数

在Mavericks上修复therubyracer/libv8(0.12.1)安装

好的,我正处于我的束缚之中.有一些类似的问题,但他们都提到了Therubyracer 0.10,他们大多认为问题可以通过升级到0.12来解决.

我有类似的问题,但是当我使用0.12时.

类似的问题

我在使用'标准'(xcode?)gcc以及来自自制软件的apple-gcc42和gcc时遇到了问题.我都试过--with-system-v8--without-system-v8,并再次,没有骰子.

这是一些日志:

从头开始…

 $ cd ~/Documents/code/website
 $ rvm gemset empty
 $ ruby -v
 ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin10.8.0]
 $ grep rubyracer Gemfile
 gem 'therubyracer', '~> 0.12.0'
 $ brew list | grep v8
 $ cat ~/.bundle/config 
 $ cat .bundle/config 
 BUNDLE_BIN: bin
 $ $CXX
 $ $CPP
 $ $CC
 $ which gcc
 /usr/bin/gcc
 $ which g++
 /usr/bin/g++
 $ g++ -v
 Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with- 
 gxx-include-dir=/usr/include/c++/4.2.1
 Apple LLVM version 5.1 (clang-503.0.38) (based …
Run Code Online (Sandbox Code Playgroud)

gcc rubygems v8 therubyracer libv8

24
推荐指数
3
解决办法
2万
查看次数

如何在PHP5.5上安装V8js?

我想在Ubuntu 12.04上安装PHP5.5的v8js扩展,但无法使其正常工作.

当我尝试使用PECL安装v8js扩展版本0.2.0(最新版本)时,我收到此消息:

configure:错误:libv8必须是3.24.6或更高版本错误:`/ tmp/pear/temp/v8js/configure --with-v8js'失败

如果我尝试安装旧版本,我有编译错误.此消息与我的问题非常相似:在ubuntu上为php安装v8js

我该如何解决这个问题?

编辑:我无法使用PHP5.5在Ubuntu 14.04上安装它,即使使用PHP将PHP降级到PHP 5.4降级.但是,使用Ubuntu 12.04和PHP 5.4非常有效.我没有尝试在Ubuntu 12.04上从PHP 5.5降级到5.4.

php ubuntu v8 libv8

12
推荐指数
1
解决办法
6672
查看次数

libv8-3.16.14.3无法安装 - Rails 4.1.8

所以我有这个问题,其中libv8-3.16.14.3无法安装,即使它欺骗性地告诉你它确实安装.

所以问题的第一个迹象就是:

An error occurred while installing libv8 (3.16.14.3), and Bundler cannot continue.
Make sure that `gem install libv8 -v '3.16.14.3'` succeeds before bundling.
Run Code Online (Sandbox Code Playgroud)

期间bundle install.所以我做了一些谷歌搜索,并遇到了这个响应,运行时:

gem install libv8 -v '3.16.14.3' -- --with-system-v8
Building native extensions with: '--with-system-v8'
This could take a while...
Successfully installed libv8-3.16.14.3
Parsing documentation for libv8-3.16.14.3
Done installing documentation for libv8 after 1 seconds
1 gem installed
Run Code Online (Sandbox Code Playgroud)

引导您认为它有效.但bundle install再次运行,看到有问题的错误是:

An error occurred while installing libv8 (3.16.14.3), and Bundler cannot continue. …
Run Code Online (Sandbox Code Playgroud)

bundle ruby-on-rails bundler libv8

8
推荐指数
1
解决办法
5135
查看次数

什么是therubyracer或libv8 for rails应用程序?

我正在研究一个项目,经常遇到有关therubyracer和libv8的问题,所以我决定删除它们.它似乎是唯一使用它们作为依赖的东西是较少的轨道,我想要删除无论如何.

我的主要问题是它们是什么,我是否需要它们在普通应用程序中,如果是这样,为什么?

ruby-on-rails therubyracer libv8

8
推荐指数
1
解决办法
8564
查看次数

安装libv8 3.11.8.3时出错

我正在运行全新安装的OSX 10.9 Mavericks和XCode 5.0.1.当我试图在我的项目中运行bundle install时,它无法安装libv8 gem.这是输出:

ERROR:  Error installing libv8:
        ERROR: Failed to build gem native extension.

        /Users/user1/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
    creating Makefile
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Unable to find a compiler officially supported by v8.
    It is recommended to use GCC v4.4 or higher
    Using compiler: g++
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Users/user1/.rvm/gems/ruby-1.9.3-p448/gems/libv8-3.11.8.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o has no symbols
    In file included from ../src/accessors.cc:28:
    In file included from ../src/v8.h:60:
    In file included from ../src/objects-inl.h:38:
    In file included from ../src/elements.h:33:
    In file included from ../src/heap.h:41:
    ../src/store-buffer.h:229:9: error: private …
Run Code Online (Sandbox Code Playgroud)

ruby macos gcc libv8 osx-mavericks

7
推荐指数
2
解决办法
3803
查看次数

安装libv8(3.16.14.7)时发生错误,Bundler无法继续

我在这里得到一个循环错误:

Bundler::GemspecError: Could not read gem at /path/to/website/vendor/cache/ruby/2.1.0/cache/libv8-3.16.14.7-x86_64-darwin-14.gem. It may be corrupted.
An error occurred while installing libv8 (3.16.14.7), and Bundler cannot continue.
Make sure that `gem install libv8 -v '3.16.14.7'` succeeds before bundling.

$ gem install libv8 -v '3.16.14.7'

Successfully installed libv8-3.16.14.7-x86_64-darwin-14
/Users/snowcrash/.rvm/gems/ruby-2.1.5/gems/rdoc-4.0.1/lib/rdoc/markdown.rb:15931: warning: encountered \r in middle of line, treated as a mere space
Parsing documentation for libv8-3.16.14.7-x86_64-darwin-14
Done installing documentation for libv8 after 0 seconds
1 gem installed

$ bundle install --path vendor/cache
... many lines here …
Run Code Online (Sandbox Code Playgroud)

bundler rvm libv8

6
推荐指数
5
解决办法
3232
查看次数