Sqlite3 for Rails 3.1

I want to create myApp using the command

reils new myApp

but it gives an error:

Installing sqlite3 (1.3.4) with native extensions Gem :: Installer :: ExtensionBuildError: ERROR: Failed to create custom extension genders.

/usr/bin/ruby1.8 extconf.rb check for sqlite3.h ... no sqlite3.h is missing. Try installing the sqlite3 + universal port or yum install sqlite3-devel 'port and check the path to the shared library (the location where your shared sqlite3 library is located). * extconf.rb failed * Failed to create a Makefile for some reason, the necessary libraries and / or headers might be missing. Check the mkmf.log file for more details. You may need configuration options.

The configuration options provided are: --with-non-automatic dir --without-non-automatic dir --with-non-automatic enable --without-non-automatic include = $ {Blocker dir} / enable --with-non-automatic PB --without-non-automatic PB = $ {manual dir} / lib --with-makeup prog --without-makeup prog --srcdir =. --curdir --ruby = / USR / bin / ruby1.8 --with-sqlite3-dir --without-sqlite3-directory --with-sqlite3-include --without-sqlite3-include = $ {sqlite3- Dir} / enable --with-sqlite3 pb --without-sqlite3 pb = $ {sqlite3-DIR} / library --enable-local --disable-local

Gem files will be installed in / usr / lib / ruby ​​/ gems / 1.8 / gems / sqlite3-1.3.4 for verification. The results are logged in / usr / lib / ruby ​​/ gems / 1.8 / gems / sqlite3-1.3.4 / ext / sqlite3 / gem_make.out an error occurred while installing sqlite3 (1.3.4), and the Bundler could not continue. Make sure gem install sqlite3 -v '1.3.4' succeeds before binding.

What should I do? Thanks

+4
source share
2 answers

Make sure you have the development headers for SQLite3 installed.

For instance:

On Ubuntu you can use apt-get install libsqlite3-dev

On a Mac with homebrew installed: brew install sqlite .

+12
source

I found it quite useful to run this command whenever I reinstall rails on Ubuntu. This usually takes care of the super common zlib and sqlite3 errors.

/ usr / bin / apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git -core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev devxxlt-dev autoconf libc6-n -dev

+3
source

Source: https://habr.com/ru/post/1381197/


All Articles