'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 1:[1]
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.
Solution 2:[2]
I had the same error and fixed it by:
First, I opened up the Gemfile in atom and changed the line gem 'sqlite3'
to gem 'sqlite3' , '~>1.3.6'
.
Second, I ran gem install sqlite3 -v 1.3.6
on terminal.
Last, I ran bundle install
on terminal.
This worked for me... goodluck!
Solution 3:[3]
You can try installing the libsqlite3-dev
package:
sudo apt-get install -y sqlite3 libsqlite3-dev
or
gem 'sqlite3', '~> 1.3', '>= 1.3.11'
Solution 4:[4]
I had the same issue and found that I didn't need sqlite
to run my app.
So, I opened the Gemfile
and deleted gem 'sqlite3' ...
from it and everything worked fine.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | barmic |
Solution 2 | codeblue001 |
Solution 3 | ggorlen |
Solution 4 | Mostafa Wael |