2012-03-15 49 views
1

當我添加:寶石 'Twitter的引導護欄' 在軌道上的錯誤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. 
+0

出現t他的問題是與Windows上的紅寶石賽車,看看這個:http://stackoverflow.com/questions/6356450/therubyracer-gem-on-windows – 2012-03-15 03:07:03

+0

是啊...我堅持在Windows上發展工作,並必須評論'gem'therubyracer'在我當地的Gemfile – ScottJShea 2012-03-15 03:19:04

+0

謝謝。我知道原因,因爲libv8沒有windows版本。 – 2012-03-15 04:14:21

回答

0

解決方法是使用使用靜態CSS的twitter-bootstrap-rails版本,而不依賴於therubyracer。在你的Gemfile試試這個:

寶石 'Twitter的引導護欄',:git的=>「混帳://github.com/seyhunak/twitter-bootstrap-rails

2

懸崖的解決辦法幫我理想的。我會解決的實際問題,但添加靜態分支到我的Gemfile是一個足夠好的解決方法輔助Windows PC上開發

從Twitter的引導護欄自述:

使用靜態CSS,JS( w/o Less)

twitter-bootstrap-rails有獨立的分支(W/O較少),只是服務於最新的靜態CSS,JS文件。您可以安裝從最新版本(從分支):

gem'twitter-bootstrap-rails',::git =>'git://github.com/seyhunak/twitter-bootstrap-rails.git',:branch =>「靜態」

+0

不要忘記,如果您使用靜態分支,則必須將編譯後的bootstrap.css文件添加到您的資產管道中,方法是將以下行添加到application.css文件中: /* * = require bootstrap * / – Karl 2012-06-25 05:06:57