D
D
Dmitry2016-11-20 18:32:36
Ruby on Rails
Dmitry, 2016-11-20 18:32:36

Could not find gem 'sqlite3'. What could be the reason?

When trying to run rails s in the project folder, the terminal gives the message
Could not find gem 'sqlite3' in any of the gem sources listed in your Gemfile or available on this machine.

Run ` bundle install` to install missing
gems current directory: /tmp/bundler20161120-25046-1u39x6csqlite3-1.3.12/gems/sqlite3-1.3.12/ext/sqlite3 /usr/bin/ruby2.3 -r ./siteconf20161120-25046-gvhez0.rb extconf.rb mkmf .rb can't find header files for ruby ​​at /usr/lib/ruby/include/ruby.h extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20161120-25046-1u39x6csqlite3-1.3.12/gems/sqlite3-1.3.12 for inspection.
Results logged to /tmp/bundler20161120-25046-1u39x6csqlite3-1.3.12/extensions/x86_64-linux/2.3.0/sqlite3-1.3.12/gem_make.out Using turbolinks
-source 5.0.0
Using tzinfo 1.2.2
be the reason? The whole evening was tormented ....

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
jarosluv, 2016-11-21
@jarosluv

First you need to try installing SQLite itself (and not just its dev package).
sudo apt-get install sqlite3 libsqlite3-dev

D
Dmitry, 2016-11-23
@r_o_r

O! There is progress after sudo apt-get install sqlite3 libsqlite3-dev But now terminal says
rails s
Could not find gem 'sqlite3' in any of the gem sources listed in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.

before starting the server, I did bundle install and the sqlite3 installation was successful, but in the final it gave an error on
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /tmp/bundler20161123-3460-57vq0zdebug_inspector-0.0.2/gems/debug_inspector-0.0.2/ext/debug_inspector
/usr/bin/ruby2.3 -r ./siteconf20161123-3460-5z3b6z.rb extconf.rb
mkmf.rb can't find header files for ruby ​​at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20161123-3460-57vq0zdebug_inspector-0.0.2/gems /debug_inspector-0.0.2 for inspection.
Results logged to /tmp/bundler20161123-3460-57vq0zdebug_inspector-0.0.2/extensions/x86_64-linux/2.3.0/debug_inspector-0.0.2/gem_make.out
An error occurred while installing debug_inspector (0.0.2), and Bundler cannot continue.
Make sure that `gem install debug_inspector -v '0.0.2'` succeeds before bundling.

Ran sudo gem install debug_inspector -v '0.0.2' but gave
Building native extensions. This could take a while...
ERROR: Error installing debug_inspector:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/debug_inspector-0.0.2/ext/debug_inspector
/usr/bin/ruby2.3 -r ./siteconf20161123-4179-mk02jr.rb extconf.rb
mkmf.rb can't find header files for ruby ​​at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/debug_inspector-0.0. 2 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/debug_inspector-0.0.2/gem_make.out
What could be the reason?

V
Vayladion Gognazdiak, 2016-11-28
@etspring

How was ruby ​​installed?
sudo apt-get install ruby2.3-dev ?

\curl -sSL https://get.rvm.io | bash -s stable
rvm install 2.3.0
rvm default ruby-2.3.0
rvm use ruby-2.3.0
gem install bundler
cd каталог_с_моей_неведомой_ебаниной_на_рельсах
bundle install

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question