ruby-on-rails – 在OS X 10.10上,gem install therubyracer -v
发布时间:2020-12-17 03:24:14 所属栏目:百科 来源:网络整理
导读:按照这里的步骤 “gem install therubyracer -v ‘0.10.2’” on osx mavericks not installing,我能够得到therubyracer -v 0.10.2和0.12.0安装正常,但不是0.11.4. 宝石安装therubyracer -v 0.11.4 返回: Building native extensions. This could take a wh
按照这里的步骤
“gem install therubyracer -v ‘0.10.2’” on osx mavericks not installing,我能够得到therubyracer -v 0.10.2和0.12.0安装正常,但不是0.11.4.
宝石安装therubyracer -v 0.11.4 返回: Building native extensions. This could take a while... ERROR: Error installing therubyracer: ERROR: Failed to build gem native extension. /Users/thooper/.rbenv/versions/2.1.2/bin/ruby -r ./siteconf20150102-7132-9ct9a4.rb extconf.rb creating Makefile Compiling v8 for x64 Using python 2.7.9 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/thooper/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o] Error 1 make: *** [x64.release] Error 2 /Users/thooper/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.11.8.17/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly,expected binary v8 archive '/Users/thooper/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.11.8.17/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/thooper/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.11.8.17/ext/libv8/location.rb:35:in `each' from /Users/thooper/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.11.8.17/ext/libv8/location.rb:35:in `verify_installation!' from /Users/thooper/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.11.8.17/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_can_use_vfp_instructions=true CXX(target) /Users/thooper/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o CXX(target) /Users/thooper/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o CXX(target) /Users/thooper/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum.o CXX(target) /Users/thooper/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.11.8.17/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum-dtoa.o CXX(target) /Users/thooper/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.11.8.17/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/thooper/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.11.8.17 for inspection. Results logged to /Users/thooper/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/libv8-3.11.8.17/gem_make.out 解决方法
我终于得到了therubyracer 0.11.4来安装和使用Xcode 6.1.1,6.2 beta或6.3 beta(我测试了所有3个)以及Xcode 4.6.3(可用于:
https://developer.apple.com/downloads/index.action)然后运行:
# rename your current version of Xcode to make it distinguishable sudo mv /Applications/Xcode.app /Applications/$(xcodebuild -version | head -1 | sed -e 's/ //').app # Download and install Xcode 4.6.3 and run: sudo mv /Applications/Xcode.app /Applications/Xcode4.6.3.app # Switch to your 4.6.3 version of Xcode sudo xcode-select --switch /Applications/Xcode4.6.3.app # Install the version of libv8 that's tied to your version of TRR: gem install libv8 -v '3.11.8.17' # Switch back to you original version of Xcode sudo xcode-select --switch /Applications/Xcode6.x.app # Install TRR gem install therubyracer -v '0.11.4' (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |