加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 当我执行“捆绑更新”时,我从gem中获取错误,而

发布时间:2020-12-17 02:31:09 所属栏目:百科 来源:网络整理
导读:我正在使用一个使用twitter-bootstrap-rails的项目.这个项目是在 Linux机器上构建的,并使用therubyracer作为javascript运行时.我一直遇到问题,因为therubyracer似乎与Windows并不相处. therubyracer gem on windows 现在我正在尝试“捆绑更新”; “therubyra
我正在使用一个使用twitter-bootstrap-rails的项目.这个项目是在 Linux机器上构建的,并使用therubyracer作为javascript运行时.我一直遇到问题,因为therubyracer似乎与Windows并不相处.

therubyracer gem on windows

现在我正在尝试“捆绑更新”; “therubyracer”令人窒息.

我想我应该能够依靠JScript.我怎么告诉bundler忽略这一点,而不是深入研究每个gem并手动删除它对therubyracer的依赖?看起来像bootstrap,或者至少是twitter-bootstrap-rails,取决于therubyracer.

编辑:我已经按照该线程中的说明进行操作,并且我继续获得以下内容(在捆绑安装开发之后):

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.

解决方法

有一个版本的twitter-bootstrap-rails使用静态CSS,而不依赖于therubyracer.在你的Gemfile中试试这个:

gem 'twitter-bootstrap-rails',:git => "git://github.com/seyhunak/twitter-bootstrap-rails.git",:branch => "static"

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读