Ask A Question

Notifications

You’re not receiving notifications from this thread.

How I setup sqlite3 on Ruby on windows

Gabriel Baldez asked in Ruby

I installed sqlite3 in my system when I run sqlite3 --version this appears:
3.37.0 2021-11-27 14:13:22 bd41822c7424d393a30e92ff6cb254d25c26769889c1499a18a0b9339f5d6c8a

But when I try run the server or the command bundle install this message appears:
An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue.

In Gemfile:
sqlite3

I already have try so many things, edit Gemfile, put sqlite3.dll and sqlite3.def on bin folder on Ruby. Run this command to try get sqlite3 using the source rubygems.org.
Now I go try using WSL. Somebody can help me?

Reply

If you are using Windows use chocolatey to install your sqlite package and dev libraries

choco install sqlite

personally do your ruby/rails work under WSL2 if you want a fun time under windows. since WSL2 now supports systemd you will be able to do 100% the same as you would as a full ubuntu instance

use this guide to get WSL2 running
https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-11-with-gui-support#1-overview

Reply

if running ubuntu just add the sqlite dev lib package

sudo apt install libsqlite3-dev

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.