错误:无法在任何来源中找到sqlite3-1.4.0

问题描述 投票:0回答:2

我目前正在尝试运行run.rb文件,但我一直在使用sqlite3获取错误。当我输入bundle install时,我收到了以下成功消息:

Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using rake 12.3.2
Using concurrent-ruby 1.1.4
Using i18n 1.5.3
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.2.2
Using activemodel 5.2.2
Using arel 9.0.0
Using activerecord 5.2.2
Using bundler 2.0.1
Using coderay 1.1.2
Using equatable 0.5.0
Using method_source 0.9.2
Using mustermann 1.0.3
Using necromancer 0.4.0
Using tty-color 0.4.3
Using pastel 0.7.2
Using pry 0.12.2
Using rack 2.0.6
Using rack-protection 2.0.5
Using require_all 2.0.0
Using tilt 2.0.9
Using sinatra 2.0.5
Using sinatra-activerecord 2.0.13
Using sqlite3 1.4.0
Using timers 4.3.0
Using tty-cursor 0.6.0
Using tty-screen 0.6.5
Using wisper 2.0.0
Using tty-reader 0.5.0
Using tty-prompt 0.18.1
Bundle complete! 7 Gemfile dependencies, 32 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

但是,当运行ruby app/run.rb时,我收到以下消息:

Could not find sqlite3-1.4.0 in any of the sources

我一直在努力弄清楚问题是什么,我已经卸载并重新安装sqlite3,捆绑安装了一百万次,似乎没有任何工作。任何想法将不胜感激!

ruby sqlite rubygems sinatra bundler
2个回答
2
投票

对于Rails 5.2.2,您可以通过在Gemfile中指定正确版本的sqlite3来解决此问题:

gem 'sqlite3', '~> 1.3.6'

在Rails的5-2-stable分支中,您可以使用sqlite 1.4,但在5.2.2中它会导致错误。


0
投票

我有同样的错误并修复它:首先,我打开了原子中的Gemfile并将行gem 'sqlite3'更改为gem 'sqlite3' , '~>1.3.6'。其次,我在终端上跑了gem install sqlite3 -v 1.3.6。最后,我在终端上运行了bundle install

这对我有用......祝你好运!

© www.soinside.com 2019 - 2024. All rights reserved.