繁体   English   中英

rails 3.2.2上的gem'twitter-bootstrap-rails'错误

[英]gem 'twitter-bootstrap-rails' error on rails 3.2.2

当我添加:

 gem 'twitter-bootstrap-rails' 

在我的Gemfile中,我运行:

bundle install

我得到错误:

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: d:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/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 d:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/therubyracer-0.9.10 for inspe
ction.
Results logged to d:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/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.

克利夫的解决方法帮助了我。 理想情况下,我会解决实际问题,但将静态分支添加到我的gemfile是一个很好的解决方法,用于在辅助Windows PC上进行开发。

来自twitter-bootstrap-rails自述文件:

使用静态CSS,JS(没有更少)

twitter-bootstrap-rails有单独的分支(没有更少),只提供最新的静态CSS,JS文件。 您可以从最新版本(从分支)安装:

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

您可以在Windows中安装therubyracer,

https://github.com/hiranpeiris/therubyracer_for_windows

我也有问题,比如当我尝试安装twitter-bootstrap-rails它的依赖'therubyracer'时,我按照说明完成了它的工作(Windows 7)

解决方法是使用使用静态CSS的twitter-bootstrap-rails版本,而不依赖于therubyracer。 在你的Gemfile中试试这个:

gem'twitter-bootstrap-rails',:git =>“git://github.com/seyhunak/twitter-bootstrap-rails。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM