similar to: in-memory SQLite for testing

Displaying 20 results from an estimated 9000 matches similar to: "in-memory SQLite for testing"

2005 Dec 25
3
SQLite primary key schema
So after successfully getting the test SQLite db to run from memory, I tried running some tests but found that somewhere in the schema translation from Postgres (my devel database) and SQLite Rails fails to properly set the ''id'' column, which breaks all kinds of things. Take as an example my ''users'' table. In Postgres the schema is (generated with pgAdmin III):
2006 Jun 15
6
Sqlite3 test fails in Rails app
Greetings: I am using Sqlite3 database with my Rails app. When I try and run "rake tests" for the app it always fails with the error: ** Invoke default (first_time) ** Invoke test (first_time) ** Execute test ** Invoke test:units (first_time) ** Invoke db:test:prepare (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:test:prepare ** Invoke
2006 Mar 30
13
Trying Agile book, found problem
Pg. 57 of Agile asks you to create a scaffolding by typing in ruby script/generate scaffold Product Admin Instead of generating everything, it only gives me exists app/controllers/ exists app/helpers/ exists app/views/admin exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ identical
2005 Dec 23
2
SQLite in-memory
I left ":memory:" in database.yml for testing and the most simple tests in the Agile book do not work (see trace below for test_truth). Since that''s what comes with the distributed database.yml I suppose it''s me doing something wrong. Did someone get SQLite ":memory:" working? How does it grab the schema? -- fxn % rake test_units (in
2006 Jan 03
4
in-memory test database -- where''s the schema?
I''m trying to get the unit testing for a new project to use the wonderful :memory: database specification for SQLite. However, like many people before me, I can''t get the schema to import or have anything else useful. Initially, the error I get is: /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/errors.rb:94:in `check'': cannot rollback - no transaction is
2016 Oct 20
2
queue_log/cel sqlite
On Thu, Oct 20, 2016 at 4:50 AM, marek cervenka <cervajs2 at gmail.com> wrote: > i tested this > > # cat /etc/asterisk/extconfig.conf > [settings] > queue_log => sqlite3,cdrDb > > # cat /etc/asterisk/res_config_sqlite3.conf > [cdrDb] > dbfile = /var/lib/asterisk/realtime.sqlite3 > > sqlite3 /var/lib/asterisk/realtime.sqlite3 > > CREATE TABLE
2006 Mar 31
14
[newbi] Create a Model
Hello All, Yesterday i put RoR with Locomotive. I am very happy :p. So I follow this tuto (http://developer.apple.com/tools/rubyonrails.html). I used Sqlite. my database.yml # MySQL (default setup). Versions 4.1 and 5.0 are recommended. # # Get the fast C bindings: # gem install mysql # (on OS X: gem install mysql -- --include=/usr/local/lib) # And be sure to use new-style password
2007 Jun 02
2
Unit tests breaks with sqlite
Hi, I''m using an sqlite3 database with Rails and have some trouble running unit tests What I''ve done is * rails my_app * edited database.yml to use sqlite3 adapter, db/my_app_development and db/my_app_test * ruby script\generate model user * edited model class User < ActiveRecord::Base validates_presence_of :name validates_uniqueness_of :name end *
2005 Jun 29
3
trouble with active record and sqlite
I am getting an error that I can''t figure out. I have a class called Test with 3 fields, id, x, and y. When I do Test.new(''x''=>1, ''y''=>2).save, I get an error saying that id (my ''not null primary key'') can''t be null. But isn''t active record supposed to deal with setting that for me? Here''s the code
2016 Oct 20
2
queue_log/cel sqlite
hi, is it possible log cel/queue_log to sqlite? via odbc? any experience? marek
2006 Sep 26
1
Error while generating scaffold
Hello, When I run the command: "ruby script/generate scaffold Product Admin" I receive the following error after the usual changed files info: "Couldn''t find ''product'' generator" The command is based on "Agile Web Application Development with Rails" first edition on page: 57. Just to give some context to what I am doing, I just created
2005 Mar 09
10
mysql vs postgres
I''ve used mysql for quite some time now. Other than crashing when the partition gets full, I''ve had no problems with it. But I''ve heard great things about postgres and have seen some people say it''s much superior to mysql. So, with a Rails application, is there any reason why I would want to learn/use another DB besides mysql? Any pragmatic benefits?
2005 May 03
8
SQLite3 + RAM drive => 3 times faster unit tests
One problem I sort of always had with the ActiveRecord''s tight coupling to the SQL backend is how slow it makes the unit tests. OK, there are some ways to make it faster at a price of extra complexity (reusing the fixtures, doing a rollback in the end of the test, etc), but still - it is much slower than what I would like a unit test to be. Today I had a very simple idea (why, oh why
2006 Jan 02
3
Selecting conditionally from HABTM
Hello, I was wondering whether there is a nice Rubyesque way of selecting from a pair of HABTM models where one of them is inherited from another object. Here is the situation: I have a ''posts'' table from which ''replies'' and ''articles'' are inherited. Articles have_and_belong_to_many categories, but neither posts nor replies do (it just does
2006 May 24
7
migrations and SQLite
I read in the instructions of Tracks that "upgrading via the rake migrate command is quite a bit more tricky currently with SQLite and SQLite3". Is there any gotcha regarding migrations and SQLite3? -- fxn
2007 Nov 15
2
Story adapter and SQLite Was:What command to run all stories?
Hi, by switching to MySQL from SQLite, it fixed the problem. I ran rdebug on it and it is trying to call I ActiveRecord::Base.connection.begin_db_transaction. from ActiveRecordSafetyListener.scenario_started. I don''t think SQLLite likes transactions. Ed On Nov 15, 2007 10:56 AM, Ed Howland <ed.howland at gmail.com> wrote: > If I run the story stand-alone, I get: > ruby
2008 Jan 15
6
SQLite concurrency, SQLite3::BusyException
I am currently experiencing concurrency issues after moving from MySQL to SQLite. My original program worked fined using MySQL but is now returning "SQLite3::BusyException" errors. The same result happens whether or not I enable the allow_concurrency flag. If I do manually acquire a lock on the SQLite DB the problem would disapear, but I thought that rails was supposed to handle this
2006 Feb 08
1
Save only inserts null instead of actual values
Hi, whenever I try to save my form, rails only enters null values in my database. I''m using sqlite, I thought that sqlite might be the problem, but the problem remains when I switched to mysql. Here is my code: controller: class CollectionController < ApplicationController def new @collection = Collection.new end def create if request.get? redirect_to :action
2006 Mar 04
5
SQlite3 hoopup issues on mac os x
friends of the int-arweb. what does this mean: (in bold) ActiveRecord::StatementInvalid in Contact#create SQLite3::SQLException: SQL logic error or missing database: INSERT INTO contacts Context: this happened after I had finished setting up RoR as per the tutorial at http://maczealots.com/tutorials/ruby-on-rails/ the database, is like, there. is there a nice ruby command like deal to
2006 May 16
1
ActionMailer w/o database link (e.g., feedback form)
Hey, A total noobieQ. Apologies, still learning. Could anyone point me to examples of a non-database-driven feedback form, for instance, a simple e-mail feedback form that takes advantage of ActionMailer? (How do I carry a POST through to a ''def'' w/o a database connection?) Thanks! -- Posted via http://www.ruby-forum.com/.