1

When I add:

 gem 'twitter-bootstrap-rails' 

in my Gemfile and I run:

bundle install

I an get error:

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.
ScottJShea
  • 7,041
  • 11
  • 44
  • 67
Rollen Holt
  • 497
  • 2
  • 11
  • 19
  • Appears the problem is with ruby racer on Windows, check out this: http://stackoverflow.com/questions/6356450/therubyracer-gem-on-windows – Jayson Lane Mar 15 '12 at 03:07
  • Yeah... I am stuck developing on Windows at work and have to comment out `gem 'therubyracer` on my local Gemfile – ScottJShea Mar 15 '12 at 03:19
  • thank you. and I hava know the reason.because the libv8 dosen't have version for windows . – Rollen Holt Mar 15 '12 at 04:14

3 Answers3

2

Cliff's workaround helped me. Ideally I would fix the actual problem but adding the static branch to my gemfile was a good enough workaround for developing on a secondary windows PC.

From the twitter-bootstrap-rails readme:

Using Static CSS, JS (w/o Less)

twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest static CSS, JS files. You can install from latest build (from branch):

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

manderson
  • 98
  • 13
  • Don't forget, if you use the static branch, you have to add the compiled bootstrap.css file to your asset pipeline by adding the following lines to your application.css file: /* *= require bootstrap */ – Karl Jun 25 '12 at 05:06
1

You can install the therubyracer in Windows,

https://github.com/hiranpeiris/therubyracer_for_windows

I also have problems like when I try to install twitter-bootstrap-rails its dependency 'therubyracer' , I followed the instructions and its work perfectly on(Windows 7)

Jay
  • 322
  • 1
  • 6
  • 21
0

A workaround is to use the version of twitter-bootstrap-rails that uses static CSS, without the dependency on therubyracer. Try this in your Gemfile:

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

Cliff Darling
  • 225
  • 1
  • 3