這是我的錯誤: C:> gem install sqlite3-ruby 臨時增強PATH以包含DevKit ... 構建原生擴展。這可能需要一段時間... 錯誤:錯誤安裝的sqlite3-紅寶石: 錯誤:未能建立寶石原生擴展。我無法在rails 3.2上安裝sqlite3 3.2 Windows
C:/Ruby200-x64/bin/ruby.exe extconf.rb
檢查sqlite3.h ...... * extconf.rb失敗* 無法創建Makefile文件由於某些原因,可能是缺乏必要 庫和/或頭。檢查mkmf.log文件以獲取更多詳細信息。您可能需要配置選項 。
提供的配置選項: --with-OPT-DIR --without-OPT-DIR --with-OPT-包括 --without-OPT-包括= $ {停用DIR} /包括 --with-opt-lib --without-opt-lib = $ {opt-dir}/lib --with-make-prog --without-make-prog --srcdir =。 --curdir --ruby = C:/ Ruby200-X64 /斌/紅寶石 --with-sqlite3的-DIR --without-sqlite3的-DIR --with-sqlite3的-包括 --without-sqlite3-包括= $ {sqlite3的-DIR} /包括 --with-sqlite3的-LIB --without-sqlite3的-LIB = $ {sqlite3的-DIR}/ --enable本地 - 禁用本地 C:/ Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:431:在try_do': The compiler failed to ge nerate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:562:in
try_cpp' from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1086:in block in find_header ' from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:892:in
block in checking_for ' 從C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:337:在block (2 levels) in p ostpone' from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:307:in
開放' from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:337:block in postpone' from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:307:in
open' from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:333:在postpone' from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:891:in
checking_for ' 從C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1085:在find_header' from extconf.rb:34:in
'
寶石文件將保持安裝在C:/ Ruby200-X64/LIB /紅寶石/gems/2.0.0/gems/sqlit e3-1.3.7進行檢查。 結果記錄到C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/ext/sqli TE3/gem_make.out
的Gemfile: 源 'https://rubygems.org'
gem 'rails'
gem 'jquery-rails'
gem 'bootstrap-sass', '2.0.0'
gem 'bcrypt-ruby'
gem 'faker', '1.0.1'
gem 'will_paginate'
gem 'bootstrap-will_paginate', '0.0.5'
group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.12.2'
gem 'guard-rspec', '0.5.5'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.4'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
group :test do
gem 'capybara', '1.1.2'
gem 'factory_girl_rails', '1.4.0'
gem 'cucumber-rails', '1.2.1', require: false
gem 'database_cleaner', '0.7.0'
gem 'rb-fsevent', '0.4.3.1', :require => false
gem 'growl', '1.0.3'
gem 'guard-spork', '0.3.2'
gem 'spork', '0.9.2'
gem 'launchy', '2.1.0'
gem 'ffi', '1.1.0'
end
我已經安裝的devkit。我正在運行ruby 2.0.0。一切都在Ruby 1.9.3上完美運行。誰能幫我?
事情我已經嘗試:
1. bundle install (I do not know why it just skips sqlite3)
2. gem install sqlite3
3. gem install sqlite3-ruby
4. I've also included the -- --with-sqlite3-dir=/usr/local/lib on each of those lines
當我做捆綁安裝,它跳過了sqlite3的寶石,通常安裝所有其他寶石。
我已經安裝了的devkit和我去了sqlite3的網站,並得到了窗口和exe文件.dll文件,並把它放在我ruby2.0 bin文件夾。
編輯:另外,當我運行軌道服務器和負載的locahost:3000,它告訴我,運行安裝了activerecord-sqlite3的適配器
當我運行它,它說沒有這樣的寶石和將它包含在我的gemfile中,但它包含在我的gemfile中。