2014-04-03 103 views
0

蔭試圖讓這個工作:twitter-bootstrap-rails,但如果我輸入bundle install,我得到以下錯誤:Ruby on Rails的 - 設置引導3 - 捆綁安裝錯誤

Fetching gem metadata from https://rubygems.org/.......... 
Fetching additional metadata from https://rubygems.org/.. 
Resolving dependencies... 
[...] 
Using sqlite3 1.3.9 

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension 
. 

     C:/_Festplatte_D/RubyOnRails/Ruby1.9.3/bin/ruby.exe extconf.rb 
checking for main() in -lpthread... no 
checking for v8.h... no 
*** extconf.rb failed *** 
Could not create Makefile due to some reason, probably lack of 
necessary libraries and/or headers. Check the mkmf.log file for more 
details. You may need configuration options. 

Provided configuration options: 
     [...] 
C:/_Festplatte_D/RubyOnRails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.3/ 
ext/libv8/location.rb:50:in `configure': You have chosen to use the version of V 
8 found on your system (Libv8::Location::System::NotFoundError) 
and *not* the one that is bundle with the libv8 rubygem. However, 
it could not be located. please make sure you have a version of 
v8 that is compatible with 3.16.14.3 installed. You may 
need to special --with-v8-dir options if it is in a non-standard 
location 

thanks, 
The Mgmt 

     from C:/_Festplatte_D/RubyOnRails/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/lib 
v8-3.16.14.3/lib/libv8.rb:7:in `configure_makefile' 
     from extconf.rb:32:in `<main>' 


Gem files will remain installed in C:/_Festplatte_D/RubyOnRails/Ruby1.9.3/lib/ru 
by/gems/1.9.1/gems/therubyracer-0.12.1 for inspection. 
Results logged to C:/_Festplatte_D/RubyOnRails/Ruby1.9.3/lib/ruby/gems/1.9.1/gem 
s/therubyracer-0.12.1/ext/v8/gem_make.out 
An error occurred while installing therubyracer (0.12.1), and Bundler cannot 
continue. 
Make sure that `gem install therubyracer -v '0.12.1'` succeeds before bundling. 

我也試過這個解決方案therubyracer_for_windows,但它沒有工作對我來說...

我使用win7的,ruby1.9.3,rails4,...

是否有任何人誰可以幫我?

+0

不知道這是否會工作,因爲我還沒有這個錯誤呢。嘗試刪除Gemfile.lock(刪除它)並再次執行'bundle install'以嘗試重新創建Gemfile.lock。這在我的情況下工作了幾次 –

+0

謝謝。我會盡快明天嘗試。我希望它能工作:] – Ismoh

+0

它沒有工作,但無論如何感謝。 – Ismoh

回答

0

SOLUTION:

這聽起來很愚蠢,但我卸載了所有的Ruby版本(也有一些由左一個較老的項目),並且還卸載了所有依賴於Ruby(Ruby on Rails)的全部。

然後,我決定谷歌哪個版本是穩定和兼容(Ruby和RoR)。 之後,我安裝了ruby 1.9.3p545 (2014-02-24) [i386-mingw32]Rails 4.0.4

此外,我建立了我的環境變量爲如下: (CAU的是剛剛上市的老版本的路徑)

  • 路徑
  • %RUBY_HOME%\ BIN;%JAVA_HOME%\ bin中

&

  • RUBY_HOME
  • C:\ Ruby193 \

最後我發現這很容易&快速Tutorial

現在一切正常。 感謝上述所有人:]

0

您添加的寶石是爲您提供的GitHub庫讀取引導2.3.2:

Twitter Bootstrap 2.3.2 for Rails Asset Pipeline 

對於引導3,你也可以用青菜寶石來自同一作者: 只需添加

gem 'bootstrap-sass' 

在您的Gemfile上

+0

我應該仔細閱讀。但有一個[鏈接](https://github.com/seyhunak/twitter-bootstrap-rails/tree/bootstrap3),和它的安裝方式完全相同。 無論什麼...... 我在'Gemfile中添加了'gem'bootstrap-sass'',但'bundle install'後出現錯誤。 任何想法? – Ismoh

0

您正在使用twitter-bootstrap-rails gem。如果您使用的是官方支持的Bootstrap gem,那麼您將獲得最新的Bootstrap v3.2,並且在Windows上安裝它時不會出現問題。

有關示例應用程序,展示瞭如何引導和Rails集成,請參閱:

Rails and Bootstrap

+0

如何使用bootstraps-sass? 像AndreDurao說的那樣,我應該「只」將gem'bootstrap-sass''添加到我的Gemfile中嗎? 我做了,但'捆綁安裝'相當無效,你可以在主題中看到。我究竟做錯了什麼 ? – Ismoh