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
0
votes
0 answers

Ruby/Sqlite3: Please switch to passing bind parameters as an array

New to ruby here - getting an error about bind parameters in my db_add_notice method. Having trouble googling this error for some reason. Can someone point out what's wrong? Thanks. ./check.rb:57:in `db_add_notice' is calling…
Koko
  • 459
  • 4
  • 14
0
votes
0 answers

What are the equivalents of sqlite3 options .dump and .read in sqlite3-ruby gem?

What I want is the ruby way to perform the following actions: # dump database in SQL text format echo .dump | sqlite3 mydb.sqlite3 > mydump.sql # execute sql queries found on file mydump.sql to rebuild database sqlite> .read mydump.sql I want to…
Thanasis Petsas
  • 4,378
  • 5
  • 31
  • 57
0
votes
1 answer

Rails: Object saving in console but not within app

I know this must be a dumb error somewhere, but I've been going in circles trying to figure out why my objects only save within the console, and not in the app itself. Anyone have an idea? Here's the code: Controller: class JobsController <…
0
votes
1 answer

sqlite3-ruby . error

rake aborted! no such file to load -- sqlite3/sqlite3_native :33:in require' :33:inrescue in require' :29:in `require' i jus keep gettin this error . info on my system Ubuntu server 10.04 rails 2.3.8 ruby…
akhil
  • 1
  • 2
0
votes
1 answer

Ruby on rails Unknow attribute when importing csv file to database

I'm trying to import a csv file to a ruby on rails app database. I got this error unknown attribute '2191' for Landslide. when running bundle exec rake db:import_csv. 2191 is the first item on the first row of the csv file. import_csv.rake require…
Tri Nguyen
  • 1,688
  • 3
  • 18
  • 46
0
votes
0 answers

Rails how do I create and access tables dynamically?

I am trying to create a chat project and I need to create message-tables dynamically. Lets say there are 3 users, user1, user2 and user3. When user1 sends the first time a message to user2 I want a table(user1_user2) to be created. When user1 sends…
Ivane Gkomarteli
  • 133
  • 3
  • 18
0
votes
1 answer

Wrong sqlite3.so architecture on Mac OS X

I'm trying to get Schuyler Erle's Ruby-based geocoder (https://github.com/geocommons/geocoder) up and running locally on Mac OS 10.6. Upon calling lib/tiger_import (available at above link) to import Tiger shapefiles into a sqlite db, I get the…
danpelota
  • 2,245
  • 1
  • 20
  • 17
0
votes
1 answer

Ruby - sqlite3, inserting a non ascii string into database

When trying to insert into the database a string such as : "セブンゴースト; 神幻拍挡07;" there is no error but it is read as nil after a select. Exemple : string = "セブンゴースト; 神幻拍挡07;" db = SQLite3::Database.new "randomfilename" prep = db.prepare "INSERT INTO…
0
votes
2 answers

My has_many - belongs_to tables in ruby on rails don't seem to be related.

I made 'hospital_review' table and 'hospital_review_comments' table with 1:N relationship on ruby on rails. 'hospital_review' table's migration file is like this. class CreateHospitalReviews < ActiveRecord::Migration def change create_table…
felipa
  • 1
0
votes
1 answer

rake db:migrate rake aborted! StandardError: An error has occurred

Would be very grateful if someone could help at least to understand where the issue could be coming from. I'm having problems with migration with the project I'm working on. I even started a brand new one but the issue is still assuring the same.…
elibar
  • 1
  • 1
0
votes
1 answer

Cannot use sqlite3 with ruby 1.9.2 and rails 3.0.0 on windows

I have first to explain a little bit my context, then the question: I have used Ruby on Rails now for 3 years with different applications, and upgraded from 1.2 up to 2.3.9. I want to upgrade to 3.0.0 as fast as possible. All I have read about it…
mliebelt
  • 15,345
  • 7
  • 55
  • 92
0
votes
1 answer

Can you connect to an SQL database and use the data from that database to update a table in SQLite3?

I am new to Ruby-on-rails and need to be able to build a Rake file that will connect to a corporate data source and then use the data to update a table in SQLite3. Is that possible? Should I be using a rake file? I would eventually want to use a…
Bill G
  • 1
0
votes
1 answer

Deleting multiple objects in HABTM reference table

Im trying to destroy multiple records in my database table where :list column has the same name, however I get an error when I click on Destroy link: Could not find table 'bookmarks_posts', it says the error is in my controller line: if…
kvadrats
  • 3
  • 3
0
votes
1 answer

error: migrate sqlite3 db to postgresql for rails app hosted on heroku

I am trying to host my rails app on heroku, i set the app up initially usually sqlite3 because i didn't realise it wasn't compatible with Heroku. I'm trying to follow railscast #342 but I keep getting errors and not sure how to fix them. When i run…
javatar
  • 13
  • 4
0
votes
1 answer

Rails rake db:seed Inserts nulls instead of values

I'm using Ruby 2.1.5 and Rails 4.2.1 I'm trying to put some static database entries into a sqlite3 table via seeds.rb. When I run rake db:seed, I get the correct number of rows inserted with appropriate timestamp columns, but the actual data…
P.H.
  • 471
  • 1
  • 4
  • 23