gpt4 book ai didi

ruby-on-rails - 失败 'gem install sqlite3'

转载 作者:行者123 更新时间:2023-12-03 18:35:19 25 4
gpt4 key购买 nike

当我运行rails new todo时,它显示如下(相关问题Make sure that 'gem install ~ ' succeeds before bundling)。

Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read
server certificate B: certificate verify failed (https://rubygems.org/gems/sqlit
e3-1.3.10-x64-mingw32.gem)
An error occurred while installing sqlite3 (1.3.10), and Bundler cannot
continue.
Make sure that `gem install sqlite3 -v '1.3.10'` succeeds before bundling.

当我运行gem install sqlite3时,显示如下。

C:\Ruby21-x64>gem install sqlite3
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.

C:/Ruby21-x64/bin/ruby.exe 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:/Ruby21-x64/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sqlite
3-1.3.10 for inspection.
Results logged to C:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0
/sqlite3-1.3.10/gem_make.out

按照我的教科书,我已经下载了 'sqlite-shell-win32-x86' ,创建了 'c:\sqlite3' 文件夹,在该文件夹中添加了 'sqlite3.exe' 并添加了路径 'c:\sqlite3'。

我该怎么办?我无法启动 RoR...

已添加

他说

checking for sqlite3.h... no
sqlite3.h is missing.

我找到了 sqlite3.h(它位于 sqlite-amalgamation 文件夹中),所以我想接下来要做的就是将其放入正确的文件夹中。哪里是? 我把sqlite3.h放在ruby.exe所在的文件夹中,但他仍然说sqlite3.h丢失。

最佳答案

您缺少 gem 所需的系统依赖项。

sudo apt-get install sqlite3 libsqlite3-dev

http://www.askyb.com/sqlite/installing-sqlite-in-ubuntu/

关于ruby-on-rails - 失败 'gem install sqlite3',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27504943/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com