Search code examples
rubysqliterubygemssinatrabundler

Error: Could not find sqlite3-1.4.0 in any of the sources


I'm currently trying to get a run.rb file going, but I keep getting errors with sqlite3. When I type bundle install, I get this success message:

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.

However, when running ruby app/run.rb I get this message:

Could not find sqlite3-1.4.0 in any of the sources

I've been trying for hours to figure out what the issue is, I've uninstalled and reinstalled sqlite3, bundle installed a million times, and nothing seems to be working. Any ideas would be much appreciated!


Solution

  • For Rails 5.2.2 you can sort out this problem by specifying proper version of sqlite3 in your Gemfile:

    gem 'sqlite3', '~> 1.3.6'
    

    In 5-2-stable branch of Rails you can use sqlite 1.4, but in the 5.2.2 it causes the error.