Страницы

Поиск по вопросам

суббота, 13 июля 2019 г.

ошибка в при подключении гема sqlite3 в Rails проект в Ubuntu

пытаюсь поднять чужой Rails проект и модернизировать его. логи
~/Стільниця/My_RP/Inspinia clean code/Rails_Full_Version$ bundle install Fetching gem metadata from https://rubygems.org/.......... Fetching version metadata from https://rubygems.org/.. Fetching dependency metadata from https://rubygems.org/. Using rake 10.4.2 Using i18n 0.7.0 # Using длинный список других гемов Using sprockets 3.5.2 Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/leetsworker/Документи/My_RP/Inspinia clean code/Rails_Full_Version/vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.11/ext/sqlite3 /usr/bin/ruby2.3 -r ./siteconf20170606-21419-hzoj8s.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 /home/leetsworker/Документи/My_RP/Inspinia clean code/Rails_Full_Version/vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.11 for inspection. Results logged to /home/leetsworker/Документи/My_RP/Inspinia clean code/Rails_Full_Version/vendor/bundle/ruby/2.3.0/extensions/x86-linux/2.3.0/sqlite3-1.3.11/gem_make.out
An error occurred while installing sqlite3 (1.3.11), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling. ~/Стільниця/My_RP/Inspinia clean code/Rails_Full_Version$ sudo gem install sqlite3 -v '1.3.11' [sudo] пароль: Building native extensions. This could take a while... ERROR: Error installing sqlite3: ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/sqlite3-1.3.11/ext/sqlite3 /usr/bin/ruby2.3 -r ./siteconf20170606-21761-172b5en.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/sqlite3-1.3.11 for inspection. Results logged to /var/lib/gems/2.3.0/extensions/x86-linux/2.3.0/sqlite3-1.3.11/gem_make.out ~/Стільниця/My_RP/Inspinia clean code/Rails_Full_Version$
Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.2.3' gem 'bootstrap-sass', '~> 3.3.7' gem 'font-awesome-rails', '4.7.0.1'
# Use sqlite3 as the database for Active Record gem 'sqlite3'
# Use SCSS for stylesheets gem 'sass-rails', '~> 5.0.4'
# Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 1.2'
group :doc do # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', require: false end
# Use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~> 3.1.2'
# Use unicorn as the app server # gem 'unicorn'
# Use Capistrano for deployment # gem 'capistrano', group: :development
# Use debugger # gem 'debugger', group: [:development, :test]
как исправить эту ошибку?
Вариант решения, который не помогает:
~/Стільниця/My_RP/Inspinia clean code/Rails_Full_Version$ sudo apt install sqlite-dev Зчитування переліків пакунків... Виконано Побудова дерева залежностей Зчитування інформації про стан... Виконано E: Не можу знайти пакунок sqlite-dev ~/Стільниця/My_RP/Inspinia clean code/Rails_Full_Version$ sudo gem install sqlite3 Building native extensions. This could take a while... ERROR: Error installing sqlite3: ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/sqlite3-1.3.13/ext/sqlite3 /usr/bin/ruby2.3 -r ./siteconf20170606-22580-tnqs2g.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/sqlite3-1.3.13 for inspection. Results logged to /var/lib/gems/2.3.0/extensions/x86-linux/2.3.0/sqlite3-1.3.13/gem_make.out


Ответ

Оказалось, для решения задачи надо было установить пакет разработки руби
sudo apt-get install ruby-dev
и потом
sudo bundle install

Комментариев нет:

Отправить комментарий