0

Error installing sqlite3, failed to build native gem extension.

Running on Windows 10.

Following a codeacademy tutorial, I successfully installed Ruby on Rails (ruby version : 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32) (rails version : 5.1.7). Running 'bundle install' popped up with an error saying I needed to download SQlite.

No problem, I go to the SQLite website and download sqlite3. Re-running 'bundle install', I get an error saying :

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

Following the suggestion, I run this command and get the following error:

'sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first. Could not create Makefile..'

I have download sqlite3 from the website, there is no sqlite3.h file in the folders. My google and SO searches have been fruitless.

2 Answers 2

1

Can you try the steps here:

https://medium.com/@declancronje/installing-and-troubleshooting-ruby-on-rails-sqlite3-windows-10-fix-87c8886d03b

Github thread - https://github.com/sparklemotion/sqlite3-ruby/issues/224#issuecomment-482612096

Sign up to request clarification or add additional context in comments.

3 Comments

I am using windows 10, not linux.
oops. have modified the answer and posted the latest reference & fix to this issue. check it out
I checked out the thread and followed the steps without success. Check out my comment here as to why it failed - github.com/sparklemotion/sqlite3-ruby/issues/…
1

Go to Gemfile and replace gem'sqlite3' to gem 'sqlite3', '< 1.4'

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.