3 ruby sqlite rubygems ruby-on-rails
我是编程新手,正在尝试安装适用于 Windows 10 的 Ruby on Rails。
我已经尝试了几次运行 gem 安装捆绑程序,但 SQLite3 总是出现错误。
命令提示符显示从http://www.sqlite.org/安装 SQLite3 ,但我不知道将其放置在目录中的何处。
我看了看,mkmf.log但我不明白它在告诉我什么。
当我查看 RailsInstaller 的“bin”文件夹 sqlite3.def 时,存在 sqlite 3.dll sqlite3 应用程序和 sqlite3_ruby (文件和批处理文件)。
如果有人知道可能出了什么问题以及如何解决它,我真的很感激一些帮助,这个问题永远不会发生在在线操作指南上。
非常感谢
命令提示信息:
安装 sqlite3 (1.4.0) 时出错,Bundler 无法继续。确保
gem install sqlite3 -v '1.4.0' --source 'https://rubygems.org/'捆绑前成功。在 Gemfile 中:sqlite3
C:\Sites\test_app>gem install sqlite3 -v 1.4.0 暂时增强 PATH 以包含 DevKit... 构建本机扩展。这可能需要一段时间...错误:安装 sqlite3 时出错:错误:无法构建 gem 本机扩展。
Run Code Online (Sandbox Code Playgroud)current directory: C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/sqlite3-1.4.0/ext/sqlite3C:/RailsInstaller/Ruby2.3.3/bin/ruby.exe -r ./siteconf20190317-7152-n0tljg.rb extconf.rb 检查 sqlite3.h...没有 sqlite3.h 丢失。首先从http://www.sqlite.org/安装 SQLite3 。 * extconf.rb 失败 *由于某种原因无法创建 Makefile,可能缺少必要的库和/或头文件。检查 mkmf.log 文件以获取更多详细信息。您可能需要配置选项。
提供的配置选项: --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
要了解此扩展无法编译的原因,请检查可在此处找到的 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 失败,退出代码 1
Gem 文件将保留安装在 C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/sqlite3-1.4.0 中以供检查。结果记录到 C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/sqlite3-1.4.0/gem_make.ou
Rails 尝试自动安装最新版本的 sqlite3 gem (1.4),但该新版本还不能与 Rails 一起使用\xe2\x80\x99。指定一个像这样工作的版本:
\n\n宝石文件
\n\ngem 'sqlite3', '< 1.4'\n并重新运行bundle install。
| 归档时间: | 
 | 
| 查看次数: | 6770 次 | 
| 最近记录: |