[英]I installed Ruby on Rails and I have a problem with installing SQLite3. Windows 10
$ bundle install
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Using rake 12.3.2
Using concurrent-ruby 1.1.5
Using i18n 1.6.0
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.1.7
Using builder 3.2.3
Using erubi 1.8.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.2 (x86-mingw32)
Using rails-dom-testing 2.0.3
Using crass 1.0.4
Using loofah 2.2.3
Using rails-html-sanitizer 1.0.4
Using actionview 5.1.7
Using rack 2.0.6
Using rack-test 1.1.0
Using actionpack 5.1.7
Using nio4r 2.3.1
Using websocket-extensions 0.1.3
Using websocket-driver 0.6.5
Using actioncable 5.1.7
Using globalid 0.4.2
Using activejob 5.1.7
Using mini_mime 1.0.1
Using mail 2.7.1
Using actionmailer 5.1.7
Using activemodel 5.1.7
Using arel 8.0.0
Using activerecord 5.1.7
Using public_suffix 3.0.3
Using addressable 2.6.0
Using bindex 0.6.0
Using bundler 2.0.1
Using byebug 11.0.1
Using xpath 3.2.0
Using capybara 2.18.0
Using ffi 1.10.0 (x86-mingw32)
Using childprocess 0.9.0
Using coffee-script-source 1.12.2
Using execjs 2.7.0
Using coffee-script 2.4.1
Using method_source 0.9.2
Using thor 0.20.3
Using railties 5.1.7
Using coffee-rails 4.2.2
Using multi_json 1.13.1
Using jbuilder 2.8.0
Using puma 3.12.1
Using sprockets 3.7.2
Using sprockets-rails 3.2.1
Using rails 5.1.7
Using rb-fsevent 0.10.3
Using rb-inotify 0.10.0
Using rubyzip 1.2.2
Using sass-listen 4.0.0
Using sass 3.7.3
Using tilt 2.0.9
Using sass-rails 5.0.7
Using selenium-webdriver 3.141.0
Fetching sqlite3 1.4.0
Installing sqlite3 1.4.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/sqlite3-1.4.0/ext/sqlite3
C:/RailsInstaller/Ruby2.3.3/bin/ruby.exe -r ./siteconf20190331-11792-61sjac.rb
extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first.
*** 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: 提供的配置选项:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/RailsInstaller/Ruby2.3.3/bin/$(RUBY_BASE_NAME)
--with-sqlcipher
--without-sqlcipher
--with-sqlite3-config
--without-sqlite3-config
--with-pkg-config
--without-pkg-config
--with-sqlcipher
--without-sqlcipher
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which can be found here: 要查看此扩展无法编译的原因,请查看mkmf.log,可在此处找到:
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/sqlite3-1.4.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/sqlite3-1.4.0 for
inspection.
Results logged to
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/sqlite3-1.4.0/gem_make.out
An error occurred while installing sqlite3 (1.4.0), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.4.0' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile: SQLite3 在Gemfile中:SQLite3
I have a windows 10 and I wanted to install bundle, when suddenly SQLITE 3 write Error. 我有一个Windows 10,我想安装捆绑,当突然SQLITE 3写错误。 I searched on the internet what's wrong with this, and how to fix this problem. 我在互联网上搜索了这个有什么问题,以及如何解决这个问题。 Because I can't run rails server. 因为我无法运行rails服务器。
Try to install sqlite3
& libsqlite3-dev
尝试安装sqlite3
和libsqlite3-dev
sudo apt-get install sqlite3 libsqlite3-dev
and run bundle install
并运行bundle install
In my opinion, Windows is not an ideal environment for developing Ruby on Rails. 在我看来,Windows不是开发Ruby on Rails的理想环境。 Most RoR tutorials and dependencies work best on Linux. 大多数RoR教程和依赖项在Linux上运行得最好。 But you can follow this guide to install Ruby on Rails on Windows: https://gorails.com/setup/windows/10 但您可以按照本指南在Windows上安装Ruby on Rails: https : //gorails.com/setup/windows/10
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.