本文介绍了当我执行“捆绑更新"时,我从不在我的 gemfile 中的 gem 中收到错误消息.我如何忽略这种依赖?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一个使用 twitter-bootstrap-rails 的项目.该项目建立在 Linux 机器上,并使用 therubyracer 作为 javascript 运行时.我一直遇到问题,因为 therubyracer 似乎与 Windows 不兼容.

I'm working with a project that uses twitter-bootstrap-rails. This project was built on a Linux box, and used therubyracer as a javascript runtime. I've been running into issues because therubyracer doesn't seem to get along with Windows.

windows 上的 therubyracer gem

现在我正在尝试捆绑更新";therubyracer"让事情变得窒息.

Right now I'm trying to "bundle update"; "therubyracer" is choking things up.

我想我应该能够依靠 JScript.我如何告诉 bundler 忽略这个,而不深入研究每个 gem 并手动删除它对 therubyracer 的依赖?似乎引导程序,或者至少是 twitter-bootstrap-rails,取决于 therubyracer.

I think I should be able to lean on JScript. How do I tell bundler to ignore this, without digging into each gem and manually removing its dependency on therubyracer? It seems like bootstrap, or at least twitter-bootstrap-rails, depends on therubyracer.

我已按照该线程中的说明进行操作,并且不断收到以下信息(在捆绑安装开发之后):

I've followed the instructions in that thread, and I keep getting the following (after bundle install development):

   Installing railties (3.2.0)
Installing coffee-rails (3.2.2)
Installing libv8 (3.3.10.4) with native extensions
Installing therubyracer (0.9.10) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        C:/Ruby/bin/ruby.exe extconf.rb
creating Makefile

make
generating v8-i386-mingw32.def
compiling rr.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
rr.cpp: In function 'VALUE rr_define_finalizer(VALUE, void*, VALUE)':
rr.cpp:48:1: warning: no return statement in function returning non-void
In file included from rr.cpp:3:0:
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Value, VALUE = long unsigned int]':
rr.cpp:159:37:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++.exe: unrecognized option '-rdynamic'
compiling v8.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
g++.exe: unrecognized option '-rdynamic'
compiling v8_array.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_array.cpp:1:0:
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Array, VALUE = long unsigned int]':
v8_array.cpp:13:36:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++.exe: unrecognized option '-rdynamic'
compiling v8_callbacks.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
g++.exe: unrecognized option '-rdynamic'
compiling v8_context.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_context.cpp:2:0:
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Context, VALUE = long unsigned int]':
v8_context.cpp:15:39:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::ObjectTemplate, VALUE = long unsigned int]':
v8_context.cpp:22:143:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Value, VALUE = long unsigned int]':
v8_context.cpp:23:110:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++.exe: unrecognized option '-rdynamic'
compiling v8_date.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_date.cpp:4:0:
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Date, VALUE = long unsigned int]':
v8_date.cpp:21:52:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++.exe: unrecognized option '-rdynamic'
compiling v8_debug.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
g++.exe: unrecognized option '-rdynamic'
compiling v8_exception.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_exception.cpp:3:0:
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::StackTrace, VALUE = long unsigned int]':
v8_exception.cpp:48:44:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::StackFrame, VALUE = long unsigned int]':
v8_exception.cpp:68:43:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_exception.cpp: At global scope:
v8_exception.cpp:10:24: warning: '<unnamed>::stack' defined but not used
g++.exe: unrecognized option '-rdynamic'
compiling v8_external.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_external.cpp:4:0:
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::External, VALUE = long unsigned int]':
v8_external.cpp:51:60:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_external.cpp: At global scope:
v8_external.cpp:10:9: warning: '<unnamed>::references' defined but not used
g++.exe: unrecognized option '-rdynamic'
compiling v8_function.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_function.cpp:5:0:
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Function, VALUE = long unsigned int]':
v8_function.cpp:13:40:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Array, VALUE = long unsigned int]':
v8_function.cpp:23:55:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::String, VALUE = long unsigned int]':
v8_function.cpp:49:51:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++.exe: unrecognized option '-rdynamic'
compiling v8_handle.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
g++.exe: unrecognized option '-rdynamic'
compiling v8_locker.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
v8_locker.cpp: In function 'VALUE<unnamed>::Lock::Delete(VALUE)':
v8_locker.cpp:45:5: warning: no return statement in function returning non-void
v8_locker.cpp: In function 'VALUE<unnamed>::Unlock::Delete(VALUE)':
v8_locker.cpp:85:5: warning: no return statement in function returning non-void
g++.exe: unrecognized option '-rdynamic'
compiling v8_message.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_message.cpp:2:0:
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Message, VALUE = long unsigned int]':
v8_message.cpp:10:38:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++.exe: unrecognized option '-rdynamic'
compiling v8_object.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_object.cpp:1:0:
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Object, VALUE = long unsigned int]':
v8_object.cpp:17:39:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++.exe: unrecognized option '-rdynamic'
compiling v8_script.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_script.cpp:2:0:
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Script, VALUE = long unsigned int]':
v8_script.cpp:25:56:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++.exe: unrecognized option '-rdynamic'
compiling v8_string.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_string.cpp:3:0:
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::String, VALUE = long unsigned int]':
v8_string.cpp:13:38:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++.exe: unrecognized option '-rdynamic'
compiling v8_template.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_template.cpp:2:0:
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Template, VALUE = long unsigned int]':
v8_template.cpp:42:39:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::ObjectTemplate, VALUE = long unsigned int]':
v8_template.cpp:45:45:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::FunctionTemplate, VALUE = long unsigned int]':
v8_template.cpp:48:47:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Data, VALUE = long unsigned int]':
v8_template.cpp:54:53:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++.exe: unrecognized option '-rdynamic'
compiling v8_try_catch.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
g++.exe: unrecognized option '-rdynamic'
compiling v8_v8.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
g++.exe: unrecognized option '-rdynamic'
compiling v8_value.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
In file included from v8_value.cpp:1:0:
v8_handle.h: In function 'v8::Persistent<T>& rr_v8_handle(VALUE) [with T = v8::Value, VALUE = long unsigned int]':
v8_value.cpp:10:37:   instantiated from here
v8_handle.h:43:71: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++.exe: unrecognized option '-rdynamic'
compiling v8_weakref.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
g++.exe: unrecognized option '-rdynamic'
linking shared-object v8.so
g++.exe: C:/inetpub/wwwroot/app/development/ruby/1.9.1/gems/libv8-3.3.10.4/lib/libv8/build/v8/libv8.a: No such file or directory
make: *** [v8.so] Error 1


Gem files will remain installed in C:/inetpub/wwwroot/app/development/ruby/1.9.1/gems/therubyracer-0.9.10 for inspection.
Results logged to C:/inetpub/wwwroot/app/development/ruby/1.9.1/gems/therubyracer-0.9.10/ext/v8/gem_make.out
An error occured while installing therubyracer (0.9.10), and Bundler cannot continue.
Make sure that `gem install therubyracer -v '0.9.10'` succeeds before bundling.

推荐答案

另一位成员在这里帮助了我:

Another member helped me here:

告诉 Bundler从特定 gem 的安装中排除某些 gem

这被标记为没有内容的琐碎",但我不想复制/粘贴不属于我的内容,所以只需输入它.

This is being marked as "trivial" with no content, but I don't want to copy/paste content that isn't mine, so just typing this out.

这篇关于当我执行“捆绑更新"时,我从不在我的 gemfile 中的 gem 中收到错误消息.我如何忽略这种依赖?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 01:11