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
1 answer

sqlite3/data_mapper always saves time as 00:00:00 when using rspec only

I have a peculiar issue involving saving time using data_mapper and sqlite3 and rspec if I run the spec below I get this failure report # expected: 2013-01-04 07:30:00 +1100 # got: 2013-01-04 00:00:00 +1100 if I try to save the file…
JoeyC
  • 764
  • 11
  • 19
0
votes
2 answers

Rails Scaffolded reference wont save due to mass-assign restriction

I'm brand-spankin'-new to rails, so forgive me if this is a stupid question -- i simply cannot piece together enough answers to tell if i started incorrectly. Here goes. i created everything related to my Company model with rails g scaffold Company…
Kristian
  • 21,204
  • 19
  • 101
  • 176
0
votes
1 answer

How to: Single Table Inheritance in DataMapper?

I'm learning Sinatra (1.3.2) and chose to use DataMapper (1.2.0) as ORM and an in-memory SQLite (1.3.6) DB to start. Two models, Books and Downloads, are sharing most attributes, so I looked into declaring a model for STI (Single Table Inheritance)…
0
votes
1 answer

RailInstaller Rails server todo fails because of sqlite3

I'm trying to make the Rails server work, using RailsInstaller, which I downloaded at: http://railsinstaller.org/ I executed all without any problem, and the server starts properly at: C:\Sites\todo But at the very moment I try to open the page in…
danis
  • 11
  • 1
0
votes
1 answer

SQLite3::NotADatabaseException (file is encrypted or is not a database) in production (Engineyard)

I am trying to parse a sqlite3 database in rails 3 (using sqlite3-ruby gem). The database to parse is coming from a file upload. Here is my controller code: require 'fileutils' require 'sqlite3' tmp = params[:file_upload][:my_file] file =…
mathieurip
  • 547
  • 1
  • 6
  • 16
0
votes
1 answer

Sqlite3 library won't open after 250 inserts

I'm trying to insert a large amount of information into a Sqlite3 database using a ruby script. After 250 db_prepare_location.execute's to do this, it stops working saying: .rvm/gems/ruby-1.9.2-p290/gems/sqlite3-1.3.6/lib/sqlite3/statement.rb:67:in…
Anoel
  • 1,053
  • 1
  • 10
  • 20
0
votes
2 answers

Pulling 4 random ID's (rows) from a Sqlite table and posting the data on a separate page in Ruby on Rails?

I know the title is ridiculously long, but I'm in need of some assistance with Ruby on Rails and Sqlite3. I had originally thought doing something like 4.times { (0..??).to_a.shuffle } would print a number between 0 and ?? (e.g. 20) four times, but…
Evan
  • 345
  • 1
  • 5
  • 14
0
votes
0 answers

I have an error using the save method in ActiveRecord

I created a User model with attributes name and email. So to create users, I opened the rails console and used the sandbox. rails console --sandbox user1 = User.new( name: "example" , email: example@org.com) => # But when I…
0
votes
1 answer

Why is apt-get install libsqlite3-dev giving me a 404 error?

I'm trying to install a sqlite3 gem using bundler and am getting the common Failed to build native gem extensions error. I'm trying to install the necessary files to fix this and successfully installed ruby-dev using apt-get install, but when I run…
-1
votes
1 answer

New to Ruby, sqlite3 problems. I've tried everything and i'm still stuck

$ rails new project create create README.md create Rakefile create config.ru create .gitignore create Gemfile run git init from "." Initialized empty Git repository in C:/Users/eagle/project/.git/ …
-1
votes
1 answer

Ruby on Rails on Windows 'SQLite' installing error

I am facing this problem any one can help me. Ruby version 2.0.0 and rails version 4.2.1. And run this Command also. 'gem install sqlite3 --platform=ruby -- --with-sqlite3-include=c:/sqlite/include --with-sqlite3-lib=c:/sqlite/lib'.
-1
votes
1 answer

How to solve the Gem::LoadError in Ruby on Rails?

I am new to Ruby, previously I installed an older Ruby and gem versions and I create one sample project. Now I... uninstall the Ruby and all using uninstall program via control panel. install new versions of ruby and all. run the server - it throws…
selvam
  • 1,177
  • 4
  • 18
  • 40
-1
votes
1 answer

Unique constraint on a column excluding null values

I have a user database, it has Company column, it can be empty i.e null or may contain some value. But if contains any value, it should be unique. If I use the unique attribute in my model it is not allowing to have multiple null values for the…
Hrishikesh Sardar
  • 2,907
  • 4
  • 21
  • 33
-1
votes
1 answer

No write permissions when trying to install gem in Ubuntu 12.04

I am trying to run this command gem intstall sqlite3-ruby -v 1.2.5 on Ubuntu 12.04 but I keep getting this error: you dont have write permissions into the /var/lib/gems/1.9.1 directory This is stopping me from running the bundle install command…
user1684570
  • 87
  • 1
  • 2
-2
votes
1 answer

Ruby failing to run after upgrading (sqlite3_native LoadError); sqlite3 not upgrading properly

I have upgraded to ruby 2.5.0 but I am having conflicts everywhere. I have checked previous posts on stack overflow such as: Ruby on Rails - "Add 'gem sqlite3'' to your Gemfile" cannot load such file — sqlite3/sqlite3_native cannot load such file --…
A. Verma
  • 21
  • 2
1 2 3
14
15