捆绑安装无法完成执行。它被困在中间

时间:2014-07-27 07:47:51

标签: ruby-on-rails ruby bundler

当我运行捆绑安装时,它会卡在最后。

这是我的捆绑控制台输出

 !  ~/r/mangoweb   master  bundle install                                                                           Sun Jul 27 12:45:28 IST 2014
Updating git://github.com/mongoid/mongoid.git
Updating git://github.com/Rameshv/mongoid-paranoia.git
Updating git://github.com/resque/resque.git
Updating git://github.com/zapnap/resque_mailer.git
Updating git://github.com/michaeldv/awesome_print.git
Updating https://github.com/stripe/stripe-ruby
Updating git://github.com/thedarkone/rails-dev-boost.git
Updating git@github.com:capistrano/rvm.git
Fetching gem metadata from http://rubygems.org/.......
Fetching additional metadata from http://rubygems.org/..
Resolving dependencies...
Using rake 10.3.2
Using i18n 0.6.11
Using minitest 4.7.5
Using multi_json 1.10.1
Using thread_safe 0.3.4
Using tzinfo 0.3.40
Using activesupport 4.0.2
Using builder 3.1.4
Using erubis 2.7.0
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.0.2
Using mime-types 1.25.1
Using polyglot 0.3.5
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 4.0.2
Using activemodel 4.0.2
Using activerecord-deprecated_finders 1.0.3
Using arel 4.0.2
Using activerecord 4.0.2
Using addressable 2.3.6
Using awesome_print 1.2.0 from git://github.com/michaeldv/awesome_print.git (at v2)
Using json 1.8.1
Using mini_portile 0.6.0
Using nokogiri 1.6.3.1
Using aws-sdk 1.49.0
Using bcrypt 3.1.7
Using bcrypt-ruby 3.1.5
Using coderay 1.1.0
Using better_errors 1.1.0
Using bson 2.3.0
Using bundler 1.6.1
Using colorize 0.7.3
Using net-ssh 2.9.1
Using net-scp 1.2.1
Using sshkit 1.5.1
Using capistrano 3.0.1
Using capistrano-bundler 1.1.2
Using capistrano-rails 1.1.0
Using capistrano-rvm 0.1.1 from git@github.com:capistrano/rvm.git (at master)
Using carrierwave 0.10.0
Using connection_pool 2.0.0
Using optionable 0.2.0
Using moped 2.0.0
Using origin 1.1.0
Using mongoid 4.0.0.alpha1 from git://github.com/mongoid/mongoid.git (at v4.0.0.alpha1)
Using mongoid-grid_fs 2.1.0
Using carrierwave-mongoid 0.7.1
Using timers 1.1.0
Using celluloid 0.15.2
Using choice 0.1.6
Using coffee-script-source 1.7.1
Using execjs 2.2.1
Using coffee-script 2.3.0
Using thor 0.19.1
Using railties 4.0.2
Using coffee-rails 4.0.1
Using hike 1.2.3
Using tilt 1.4.1
Using sprockets 2.11.0
Using sprockets-rails 2.0.1
Using rails 4.0.2
Using commands 0.2.1
Using css_parser 1.3.5
Using daemon_controller 1.2.0
Using daemons 1.1.9
Using orm_adapter 0.5.0
Using warden 1.2.3
Using devise 3.1.0
Using ejs 1.1.1
Using eventmachine 1.0.3
Using http_parser.rb 0.6.0
Using em-websocket 0.5.1
Using excon 0.38.0
Using factory_girl 4.4.0
Using faker 1.4.2
Using multipart-post 2.0.0
Using faraday 0.9.0
Using ffi 1.9.3
Using formatador 0.2.5
Using fog-core 1.23.0
Using fog-json 1.0.0
Using inflecto 0.0.2
Using fog-brightbox 0.1.1
Using fog-softlayer 0.3.11
Using ipaddress 0.8.0
Using fog 1.23.0
Using font-awesome-rails 4.1.0.0
Using rb-fsevent 0.9.4
Using rb-inotify 0.9.5
Using listen 2.7.9
Using lumberjack 1.0.9
Using method_source 0.8.2
Using slop 3.6.0
Using pry 0.10.0
Using guard 2.6.1
Using guard-livereload 2.3.0
Using haml 4.0.5
Using hashie 3.2.0
Using hirb 0.7.2
Using hpricot 0.8.6
Using htmlentities 4.3.2
Using jbuilder 1.5.3
Using jquery-rails 3.1.1
Using jwt 1.0.0
Using kaminari 0.16.1
Using launchy 2.4.2
Using letter_opener 1.2.0

我让它运行超过30分钟,但它仍然没有离开循环。当我强行杀死这个进程时,我收到一个错误,说没有安装libv8。我尝试手动运行,但这也不起作用。

SystemExit: exit
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.

我认为我的设置已损坏,并且rvm内爆并尝试从头开始设置所有内容,但我遇到了同样的问题。我还运行了一个gem update --system来检查是否所有内容都是最新的。即使这没有帮助。

以下是一些细节,

捆绑版:1.6 Ruby ruby​​ 2.0.0p451(2014-02-24修订版45167)[x86_64-darwin12.5.0]

不确定是什么问题。我在这里错过了什么吗?

修改1

这是我在安装libv8gem时遇到的错误

Fetching: libv8-3.16.14.3.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing libv8:
    ERROR: Failed to build gem native extension.

    /Users/skmvasu/.rvm/rubies/ruby-2.0.0-p451/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 by v8.
It is recommended to use GCC v4.4 or higher
../src/cached-powers.cc:136:18: error: unused variable 'kCachedPowersLength' [-Werror,-Wunused-const-variable]
static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);
                 ^
1 error generated.
make[1]: *** [/Users/skmvasu/.rvm/gems/ruby-2.0.0-p451/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o] Error 1
make: *** [x64.release] Error 2
/Users/skmvasu/.rvm/gems/ruby-2.0.0-p451/gems/libv8-3.16.14.3/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/Users/skmvasu/.rvm/gems/ruby-2.0.0-p451/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
    from /Users/skmvasu/.rvm/gems/ruby-2.0.0-p451/gems/libv8-3.16.14.3/ext/libv8/location.rb:35:in `each'
    from /Users/skmvasu/.rvm/gems/ruby-2.0.0-p451/gems/libv8-3.16.14.3/ext/libv8/location.rb:35:in `verify_installation!'
    from /Users/skmvasu/.rvm/gems/ruby-2.0.0-p451/gems/libv8-3.16.14.3/ext/libv8/location.rb:26:in `install!'
    from extconf.rb:7:in `<main>'
GYP_GENERATORS=make \
    build/gyp/gyp --generator-output="out" build/all.gyp \
                  -Ibuild/standalone.gypi --depth=. \
                  -Dv8_target_arch=x64 \
                  -S.x64  -Dv8_enable_backtrace=1 -Dv8_can_use_vfp2_instructions=true -Darm_fpu=vfpv2 -Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3
  CXX(target) /Users/skmvasu/.rvm/gems/ruby-2.0.0-p451/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o
  CXX(target) /Users/skmvasu/.rvm/gems/ruby-2.0.0-p451/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o
  CXX(target) /Users/skmvasu/.rvm/gems/ruby-2.0.0-p451/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum.o
  CXX(target) /Users/skmvasu/.rvm/gems/ruby-2.0.0-p451/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum-dtoa.o
  CXX(target) /Users/skmvasu/.rvm/gems/ruby-2.0.0-p451/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o

extconf failed, exit code 1

Gem files will remain installed in /Users/skmvasu/.rvm/gems/ruby-2.0.0-p451/gems/libv8-3.16.14.3 for inspection.
Results logged to /Users/skmvasu/.rvm/gems/ruby-2.0.0-p451/extensions/x86_64-darwin-12/2.0.0-static/libv8-3.16.14.3/gem_make.out

修改2

我终于找到了问题。我的系统更新到最新版本的Mavericks 10.9.4。 mac update和libv8 gem存在一些问题,我并不完全理解,但我猜它与旧的ruby设置有关。所以,做了一个rvm内爆然后从头开始安装它,还重新安装了ruby。之后,一切都像魅力一样。如果有人遇到同样的问题,请看一下这个帖子https://github.com/cowboyd/libv8/issues/120。这可能有助于解决这个问题。

2 个答案:

答案 0 :(得分:1)

libv8是一个C-binded lib,它不是RVM问题,它几乎肯定是系统中的依赖问题。尝试谷歌搜索“在macos下安装libv8”或尝试其中一个替代JS解释器,如https://github.com/sstephenson/execjs所述(默认情况下你应该在Gemfile中有这个链接)

答案 1 :(得分:0)

该错误引用了缺少的GCC编译器。看起来您可能正在运行OS X和Xcode。根据这个答案How to use/install gcc on Mac OS X 10.8 / Xcode 4.4,您可能必须特别告诉Xcopy您希望安装命令行工具。

最终只需转到&#34;首选项&#34;在Xcode中选择菜单,然后选择&#34;下载&#34;,然后选择&#34;命令行工具&#34;从列表中安装它们。