Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurred while installing sqlite3 (1.4.1), and Bundler cannot continue #111

Closed
ravigupta112 opened this issue Jul 14, 2019 · 14 comments

Comments

@ravigupta112
Copy link

Getting below error during installing the bundle

Using tilt 2.0.9
Using sass-rails 5.0.7
Using selenium-webdriver 3.142.3
Fetching sqlite3 1.4.1
Installing sqlite3 1.4.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/sqlite3-1.4.1/ext/sqlite3
C:/RailsInstaller/Ruby2.3.3/bin/ruby.exe -r ./siteconf20190714-5004-19pp95c.rb
extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/RailsInstaller/Ruby2.3.3/bin/$(RUBY_BASE_NAME)
        --with-sqlcipher
        --without-sqlcipher
        --with-sqlite3-config
        --without-sqlite3-config
        --with-pkg-config
        --without-pkg-config
        --with-sqlcipher
        --without-sqlcipher
        --with-sqlite3-dir
        --without-sqlite3-dir
        --with-sqlite3-include
        --without-sqlite3-include=${sqlite3-dir}/include
        --with-sqlite3-lib
        --without-sqlite3-lib=${sqlite3-dir}/lib

To see why this extension failed to compile, please check the mkmf.log which can
be found here:

C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/sqlite3-1.4.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/sqlite3-1.4.1 for
inspection.
Results logged to
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/sqlite3-1.4.1/gem_make.out

An error occurred while installing sqlite3 (1.4.1), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.4.1' --source 'https://rubygems.org/'`
succeeds before bundling.

In Gemfile:
  sqlite3
@XiaoYiChun
Copy link

Hi ravigupta112,
I had the same issue. Since it seemed that the RailsInstaller was somewhat old, I decided to deinstall everything and delete all the folders and to restart from scratch.

  1. I downloaded Ruby Installer Development Kit and installed it (including msys).
  2. I took the SQLite3 exe file from their website and copied it into the bin folder.
    Then I just followed the instructions as provided in section "3.1 Installing Rails", and I was successful.
    Hope it can also work for you to.

@ingafter60
Copy link

ingafter60 commented Oct 9, 2019

I had the same issue.
I solved this problem by changing sqlite 3 in gemfile:

FROM: gem 'sqlite3'
TO : gem 'sqlite3', '~> 1.3.6'

then run bundle and my problem is solved.

@mysteryven
Copy link

I had the same issue.
I solved this problem by changing sqlite 3 in gemfile:

FROM: gem 'sqlite3'
TO : gem 'sqlite3', '~> 1.3.6'

then run bundle and my problem is solve.

thanks, it helps me. but does it has bad effects?

@myousry22
Copy link

C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)

@myousry22
Copy link

@ingafter60
this error is appear cannot load such file -- sqlite3/sqlite3_native (LoadError)

@LoaezaMagda
Copy link

I had the same issue.
I solved this problem with the next command
sudo apt-get install sqlite3 libsqlite3-dev

@taimoorgit
Copy link

I had the same issue.
I solved this problem by changing sqlite 3 in gemfile:

FROM: gem 'sqlite3'
TO : gem 'sqlite3', '~> 1.3.6'

then run bundle and my problem is solved.

This was the solution for me on Windows 10 Pro after installing sqlite3.

@Omarabdul3ziz
Copy link

I tried this solution and works from me.
$ sudo apt-get install libsqlite3-dev
then,
$ bundle install

@crgc
Copy link

crgc commented Dec 6, 2021

This is what worked for me (for context, I'm on an M1 chip Mac running Big Sur 11.5.2, using Ruby 2.2.2 and Rails 4.2.8):

bundle config build.sqlite3 --with-sqlite3-lib="/usr/lib"
bundle install

@Smailancer
Copy link

How can I run this on windows 10
sudo apt-get install sqlite3 libsqlite3-dev

@Codingforhackers
Copy link

It seems that you have a problem with the dev-ruby package, so give it a try first

sudo apt-get install -y ruby-dev

If it's not working, then the problem is in the sqlite, so try this

$ sudo apt-get install libsqlite3-dev
$ sudo gem install sqlite3-ruby -- --with-sqlite3-include=/usr/include

You must specify which version you want to install('1.3.11').

$ gem install sqlite3 -v '1.3.11'
$ bundle install --path vendor/bundle

@aliceauko
Copy link

aliceauko commented Aug 22, 2022

These commands worked for me
$ sudo apt-get install -y ruby-dev
followed by
$ bundle install

@robertmabbs
Copy link
Member

A new version of RailsInstaller has been released which should solve the SQL issues.

@fmendez884
Copy link

How can I run this on windows 10 sudo apt-get install sqlite3 libsqlite3-dev

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests