sqlite3-ruby

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 apparently the latest version that works with windows) This error happens when I run rake ...

Snow Leopard upgrade -> reinstalling sqlite3-ruby gem problem

Hi all, 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 migrating my apps with a FW-cable from my old macbook to the new one. Everyth...

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] ) end There is a boolean "is_admin" column in the Person table. Assuming that some of the peopl...

Can't initialize local server for my Rails apps

Hi all, My rails apps have been freaking out on me lately. I start my local server by running "ruby script/server" like normal. The server starts, but when I try to access it via "http://localhost:3000/", it throws me a 500 error. This happens for all my rails apps, even the old ones I've left unchanged for several months now. Here ...

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 both? ...

how to install sqlite3-ruby gem with FTS3 install on snow leapord

I am working on a pet project, for searching file contents, my intention is install sqlite3 with ruby binding s with FTS3 for full text search. though after considerable experimentation was able to get sqlite3 compiled from source for ./configure FTS3=on sudo make install clean how to get sqlite3-ruby installed with FTS3 ...

ruby1.9.1 - sqlite3 problem on ubuntu 9.10 x64 (no such file to load -- sqlite3)

Hi, I have problem with sqlite3, because it is not working. irb(main):001:0> require 'sqlite3' LoadError: no such file to load -- sqlite3 from (irb):1:in `require' from (irb):1 from /usr/bin/irb:12:in `<main>' I have installed following packages: sudo apt-get install ruby1.9.1-full sudo apt-get install rubygems1.9.1 sudo...

Local install of sqlite3-ruby

On my current system i dont have root-access and i want to install sqlite3-ruby. I can compile it and i know how to set custom install-folder, but how does my ruby-installation can recognize/find that installed gem for usage? I tried prefix of my custom RUBYLIB-Folder but that didnt work either. Any suggestions? Thanks skully ...

Time fields in Rails coming back blank

I have a simple Rails 3.b1 (Ruby 1.9.1) application running on Sqlite3. I have this table: create_table :time_tests do |t| t.time :time end And I see this behavior: irb(main):001:0> tt = TimeTest.new => #<TimeTest id: nil, time: nil> irb(main):002:0> tt.time = Time.zone.now => Mon, 03 May 2010 20:13:21 UTC +00:00 irb(main):003:0> t...

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 compile the gem/sqlite3 myself in order to get this support? Is there a seprate gem I shoul...

Is it possible to bind arrays of literals in sqlite3-ruby?

I'd like to execute the following sort of query through sqlite3-ruby: SELECT * FROM foo WHERE bar IN (:items) and bind :items to one or many literals. Is this possible? The obvious technique of passing the list of literals as an array as follows doesn't seem to work: db.execute("SELECT * FROM foo WHERE bar IN (:items)", :items=>[3,...

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 < ActiveRecord::Base has_many :albums end And here is the Albums Controller def index ...

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 native extension. /Users/joshcrews/.rvm/rubies/ruby-1.8.7-p174/bin/ruby extconf.rb checkin...

SQLite3::SQLException: Cannot add a NOT NULL column with default value NULL

Hi..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 you please help me figure this out. Thanks Migration File class AddDivisionIdToProfi...

Simple SQL Lite table/import question

Hello, 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 pubmedID), I get a "expected 3 columns of data but found 2" error. I want the t...

Problem installing sqlite3-ruby on cygwin

Hey, I'm getting error while trying to install sqlite3-ruby gem: gem install sqlite3-ruby-1.3.1.gem Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby-1.3.1.gem: ERROR: Failed to build gem native extension. /usr/bin/ruby.exe extconf.rb Gem files will remain installed in /usr/lib/ru...

sqlite3-ruby compilation and sqlite3 packaging for a rails app

we are currently trying to package sqlite3 and sqlite3-ruby with an application that will be released as open source (ruby/rails based) i am evaluating if it is possible to package sqlite3-ruby for windows/linux and mac. my thoughts were, to download sqlite3-amalgamation, sqlite3-ruby on all the platforms and then compile on each. here ...

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 sqlite3.h... no sqlite3.h is missing. Try 'port install sqlite3 +universal' or 'yum install sql...

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 sqlite3-ruby' Building native extensions. This could take a while... ERROR: Error installin...

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 timer to run an update on a daily basis. ...