Questions tagged [sqlite3-ruby]

The low level SQLite3 library for Ruby. This should only be used for questions about using the low level interface directly.

The SQLite3 gem provides low level Ruby bindings to the SQLite3 embedded database.

You must have the SQLite engine installed in order to build this module.

Links:

214 questions
263
votes
19 answers

sqlite3-ruby install error on Ubuntu

I have the following error during sqlite3-ruby install: Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb checking for…
Dmitry
  • 7,300
  • 6
  • 32
  • 55
68
votes
6 answers

Cannot add a NOT NULL column with default value NULL in Sqlite3

I am getting the following error while trying to add a NOT NULL column to an existing table. Why is it happening ?. I tried rake db:reset thinking that the existing records are the problem, but even after resetting the DB, the problem persists. Can…
felix
  • 11,304
  • 13
  • 69
  • 95
24
votes
7 answers

Segmentation fault with Rails after upgrading to OS Sierra, possibly related to sqlite3 gem

After upgrading to OSX Sierra I am having an issue with random segmentation faults. It most commonly occurs when running rails test and I believe it is due to the sqlite3_adapter. My present work around is to simply quit terminal and restart it.…
Hutch
  • 829
  • 7
  • 25
17
votes
4 answers

sqlite3 gem fails to install

I'm trying to install the "sqlite3-ruby" gem (or the "sqlite3" gem) on OS X 10.6. I'm using ruby-1.9.2 and I currently get the following: $ sqlite3 --version 3.7.4 $ sudo gem install sqlite3 Building native extensions. This could take a…
Folken
  • 447
  • 2
  • 7
  • 13
13
votes
3 answers

gems: difference between sqlite3 and sqlite3-ruby?

I accidentally ran: sudo gem install sqlite3 instead of: sudo gem install sqlite3-ruby So now when I run gem list I get: gem list *** LOCAL GEMS *** sqlite3 (0.0.7) sqlite3-ruby (1.2.5) What is the difference between the two? And do I need…
aarona
  • 35,986
  • 41
  • 138
  • 186
11
votes
1 answer

Uninitialized constant Encoding with sqlite3-ruby on windows

On a new machine, installed ruby with the 1-click installer for windows. Installed rails 2.3.2 and all associated gems, then I installed the sqlite3 binaries (into the c:\ruby\bin folder). Lastly I did gem install sqlite3-ruby -v=1.2.3 (which is…
Ben Scheirman
  • 40,531
  • 21
  • 102
  • 137
10
votes
3 answers

sqlite3-ruby gem can't find sqlite3.h on ubuntu

Trying to get Rails up on ubuntu, and I’m having trouble installing sqlite3-ruby – it apparently can’t find sqlite3.h. All the references I can find to the error suggest the problem is either: sqlite3 headers aren’t installed, or make can’t find…
David Moles
  • 48,006
  • 27
  • 136
  • 235
10
votes
4 answers

sqlite3-ruby can't make on rvm 1.8.7

Upgrading to Rails 3 by starting with RVM 1.8.7. OSX 10.5.8 Output: josh-crewss-macbook:~ joshcrews$ gem install sqlite3-rubyBuilding native extensions. This could take a while...ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem…
Josh Crews
  • 779
  • 2
  • 11
  • 21
9
votes
7 answers

Problem installing sqlite3-ruby!

I'm having issues installing the sqlite3-ruby gem on crunchbang linux. After googling the past few hours and following several people with the same problem, I still haven't gotten it to work. Here is what I see after trying a 'sudo gem install…
temp
  • 91
  • 1
  • 1
  • 3
8
votes
4 answers

rake db:migrate produces "rake aborted! could not find table" error

I'm new to Rails and I'm building a simple project-tracking app for my employer. I've been developing the app on my Mac and pushing it to github. I just managed to clone my github repo to a windows box behind my company's firewall in hopes of…
hikari17
  • 143
  • 1
  • 2
  • 6
8
votes
3 answers

Simple SQL Lite table/import question

I have a simple SQL question. I want to make a 3 column database and I have the following code: sqlite3 meshdb.db "create table t1 (t1key INTEGER PRIMARY KEY, prideID, pubmedID);" When I try to import a simple csv file with two columns (prideID and…
Bobby
  • 261
  • 1
  • 3
  • 11
7
votes
1 answer

Silence Rails schema load for spork

I'm running rspec on a rails 3.0 environment. We've just switched to using sqlite3 in memory database for tests. To get this to work, you need to load the schema each run. The trouble with this is that you get a lot of output from the schema…
BlueFish
  • 5,045
  • 3
  • 26
  • 35
7
votes
3 answers

ActiveRecord::StatementInvalid SQLite3::SQLException: no such column: true:

I want to have @messages return @folder.messages where the value of column "deleted" is NOT equal to true. I'm not sure why this keeps throwing a SQLException. I guess I'm not formatting the deleted attribute properly, but I'm not sure how to fix…
6
votes
1 answer

Escaping Strings For Ruby SQLite Insert

I'm creating a Ruby script to import a tab-delimited text file of about 150k lines into SQLite. Here it is so far: require 'sqlite3' file = File.new("/Users/michael/catalog.txt") string = [] # Escape single quotes, remove newline, split on tabs,…
michaelmichael
  • 13,755
  • 7
  • 54
  • 60
6
votes
2 answers

How do you add JOIN information to a rails seeds.rb file?

I'm trying to build a seeds.rb file to add an initial admin user to the database. I have a Users table and model, and a Roles table and model. I have a join table, roles_users to join the users role and permissions. Here's the schema: create_table…
Nick
  • 61
  • 2
1
2 3
14 15