gpt4 book ai didi

ruby-on-rails - 无法安装 sqlite3 并运行捆绑安装

转载 作者:行者123 更新时间:2023-12-03 07:04:28 24 4
gpt4 key购买 nike

我正在使用 sqlite3 开发 Ruby on Rails 应用程序,当我运行 bundle install 时,出现以下错误:

Installing sqlite3 1.3.11 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /tmp/bundler20160411-6894-186xx7csqlite3-1.3.11/gems/sqlite3-1.3.11/ext/sqlite3/usr/bin/ruby1.9.1 -r ./siteconf20160411-6894-cji211.rb extconf.rb
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mkmf (LoadError)
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from extconf.rb:3:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /tmp/bundler20160411-6894-186xx7csqlite3-1.3.11/gems/sqlite3-1.3.11 for inspection.
Results logged to /tmp/bundler20160411-6894-186xx7csqlite3-1.3.11/extensions/x86_64-linux/1.9.1/sqlite3-1.3.11/gem_make.out
Using erubis 2.6.6
Using activemodel 3.0.5
Using rack-mount 0.6.14
Using rack-test 0.5.7
Using treetop 1.4.15
An error occurred while installing sqlite3 (1.3.11), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.

gem 文件

source 'http://rubygems.org'

gem 'rails', '3.0.5'

gem 'sqlite3-ruby', '1.3.2', :require => 'sqlite3'

有什么想法可以解决这个问题吗?

最佳答案

需要先安装sqlite3 sudo apt-get install libsqlite3-dev

关于ruby-on-rails - 无法安装 sqlite3 并运行捆绑安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36557028/

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