Could not find gem 'sqlite3'. В чем может быть причина?

При попытке выполнения 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

Запускаю bundle install и выдает это:

Installing sqlite3 1.3.12 with native extensions

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

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

В чем может быть причина? Весь вечер промучился....
  • Вопрос задан
  • 2248 просмотров
Пригласить эксперта
Ответы на вопрос 3
@jarosluv
Для начала нужно попробовать установить сам SQLite (а не только его dev-пакет).

sudo apt-get install sqlite3 libsqlite3-dev
Ответ написан
Комментировать
@r_o_r Автор вопроса
О! Есть прогресс после sudo apt-get install sqlite3 libsqlite3-dev Но теперь терминал выдает
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.

перед тем как запустить сервер делал bundle install и установка sqlite3 прошла успешно но в финале выдало ошибку на

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.


Запустил sudo gem install debug_inspector -v '0.0.2' но выдало
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

В чем может быть причина?
Ответ написан
Комментировать
etspring
@etspring
Начитанное быдло
А как вообще ruby ставился?
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
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы