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
1
vote
5 answers

Drawing information from relational databases in Rails

I am trying to pull the name of the Artist from the Albums database. These are my two models class Album < ActiveRecord::Base belongs_to :artist validates_presence_of :title validates_length_of :title, :minimum => 5 end class Artist <…
Trip
  • 26,756
  • 46
  • 158
  • 277
1
vote
1 answer

To get FTS3 support in SQLite3 using Ruby, do you have to manually compile sqlite?

I've got a web app where I'd like to user FTS3 functionality of SQLite3. I've got the SQLite3-ruby v1.2.5 gem installed. I'd like to have FTS3 support, and I know, due to trying to create an FTS3 table, that it doesn't come with it. Do I need to…
jefflunt
  • 33,527
  • 7
  • 88
  • 126
1
vote
1 answer

query rails compare two attributes between different record

I need make a query on Rails where select records comparing two attributes of two record for example: SELECT p.id, u1.id, u2.id FROM User u1, User u2, person p WHERE u1.weekDay = u2.weekDay AND u2.initialTime - u1.endTime < 0 AND u2.id != u1.id…
smoK
  • 55
  • 1
  • 7
1
vote
0 answers

Why is GLOB extremely slow in ruby-sqlite3 only on Windows?

Here's my query (it's automatically generated): SELECT sn.name, sa.house_number, sa.entrance, pc.postal_code, ci.name, mu.name, co.name, sa.latitude, sa.longitude FROM street_addresses AS sa INDEXED BY sa_unique_address INNER JOIN street_names AS…
Hubro
  • 56,214
  • 69
  • 228
  • 381
1
vote
1 answer

No data received Sinatra when editing a blog post

I am following this Sinatra blog post to build my own blog in Ruby Sinatra, the only difference being my templates are in slim and not ERB. The problem I'm having is in saving edited posts. The posts actually save but it's not redirecting me to the…
liloka
  • 1,016
  • 4
  • 14
  • 29
1
vote
2 answers

Rails console - TypeError: can't cast Hash to string

A little background first, I was able to get the - Angular/Rails project working on local I went to change the user/password in sqlite3 and here are the steps that I took rails c a = User.find(1) a.name = "myName" a.password_digest =…
kronus
  • 902
  • 2
  • 16
  • 34
1
vote
3 answers

Why does Model.find behaviour in a deployed environment differ from that in a development enviroment?

Using Ruby on Rails combined with capistrano and git, I've run into an annoying problem.. I have a controller "people" with the index action that looks something like this: def index @people = Person.find( :conditions => params[:search]…
Stefan
  • 9,289
  • 7
  • 38
  • 46
1
vote
5 answers

Snow Leopard upgrade -> reinstalling sqlite3-ruby gem problem

I got ruby 1.8.7 (native compiled), rails 2.3.4, OSX 10.6.2 and also sqlite3-ruby. The error I'm getting when accessing the rails app is NameError: uninitialized constant SQLite3::Driver::Native::Driver::API History: I upgraded to snow leopard by…
Carl Tessler
  • 31
  • 2
  • 5
1
vote
1 answer

Inserting SQLite rows via Ruby iteration

Inserting 5 rows of 4-column data into an existing SQLite db, and I get these errors... /Users/Sam/.rvm/gems/ruby-2.0.0-p247/gems/sqlite3-1.3.8/lib/sqlite3/database.rb:91:in `initialize': near "tagline": syntax error (SQLite3::SQLException) …
SamTalks
  • 253
  • 1
  • 6
  • 13
1
vote
1 answer

Fuzzy Duplicate Finding with SQLite

this is my first post and I'm something of a novice. I'm trying to extract a list of fuzzy duplicates from and table of company names using SQLite with sqlite3. For example, for a company like 'ZtPay' I'm currently using: SELECT name FROM tab…
1
vote
1 answer

can I join two join resources together?

The way I have implemented it, it would appear not. In data_mapper terms - I have a join resource Entry, that joins Driver, Team and Season I have a join resource Race that joins Track and Season I have a join resource Placing that joins Entry and…
JoeyC
  • 764
  • 11
  • 19
1
vote
1 answer

testing with rspec gives error: 'Please install the sqlite3 adapter' - railstutorial.org

Hi i got the same Problem like this guy: Ruby Guard questions - 'Please install the sqlite3 adapter' - railstutorial.org Executing "bundle exec rspec spec/requests/static_pages_spec.rb" gives me this: C:\Users\Me\Ruby\sample_app>bundle exec rspec…
Acimaz
  • 171
  • 1
  • 14
1
vote
0 answers

gem install sqlite3 -v '1.3.7'

when i try to install the sqlite3 with this - > gem install sqlite3 -v '1.3.7' this errors appears: Building native extensions. This could take a while... ERROR: Error installing sqlite3: ERROR: Failed to build gem native extension. …
1
vote
3 answers

Rails database ID number not being updated with destroy call

I'm new to rails so maybe the record id is not updated on destroy. I used rails scaffold to generate my MVC for a products page. When I add an entry to my data base through my products/new page it adds an id number to the entry. When in a browser…
Chapsterj
  • 6,483
  • 20
  • 70
  • 124
1
vote
1 answer

Something was wrong when insert Record with false value in rails 3.2

Recently I have started to learn Rails. Now, I'm implementing the Friendship relation in my own project. And here is the code some thing like that (some of them was collected from Internet) class Friendship < ActiveRecord::Base attr_accessible…
simpletron
  • 739
  • 4
  • 14