Displaying 20 results from an estimated 2000 matches similar to: "Unit test is failing when I am using SQLite"
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 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
2005 Dec 22
13
in-memory SQLite for testing
I am following the rails book, and arrived to the section about
testing. The test database is configured as:
test:
adapter: sqlite3
database: ":memory:"
and I get this error with the simple product test:
% ruby test/unit/product_test.rb
Loaded suite test/unit/product_test
Started
E/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/
errors.rb:94:in
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 Jun 15
10
Finding out all terms from search results. How?
Hi everybody,
I need to find out all terms (field values) from one of the fields from
a set of documents returned by search.
In other words, I have indexed documents with two fields. I do search on
one field and then want to know all other field''s values from fount
documents.
How?
--
Sergei Serdyuk
Red Leaf Software LLC
web: http://redleafsoft.com
--
Posted via
2006 Jan 31
0
"cannot start a transaction within a transaction" sqlite error on OS X Tiger but not Windows
I''ve been editing a rails app on Windows for a little while now. I
just checked it into source control and started editing on my iMac.
Everything seems to run normally, except that when I attempt to modify
the database in any way (I''m running sqlite), I get a weird error:
"cannot start a transaction within a transaction"
2009 Jul 29
0
Problem uploading file to database mysql blob field
Hi All,
Please help me ,I need to look into this issue asap, I need to change
the redmine functionality of uploading files to disk to upload them to
database. I tried suggestion on
http://dizzy.co.uk/ruby_on_rails/contents/store-file-uploads-in-database
but no luck , My form is multipart but still getting the error.
Please bare with me I am new to ruby and rails.
Here is the like for my
2006 May 24
0
Mongrel errors on file upload
I did a spike in my sandbox to make sure I understood how to do file uploads using CGI and there seems to be a problem with Mongrel. WEBrick doesn''t display the problem, but I can reproduce it everytime with Mongrel. I''d really appreciate it if someone would try out the code below and see if they see the same thing.
The browser behavior is:
- under IE6, a Page Not Found error
2007 Oct 24
7
NameError in CustomersController#index
I''m new to Rails. I finished the Cookbook tut. no problem. I''m
trying to start a project of my own, follow the same instructions but
the difference is I created the database myself.
After I create the scaffolds and try them out I get this error
NameError in CustomersController#index
uninitialized constant Customer
RAILS_ROOT: ./script/../config/..
Application Trace |
2006 Jun 15
1
Ferret::Analysis::PerFieldAnalyzerWrapper is not exported
Hi,
I am on Ferret 0.9.3 and it seems to me that
Ferret::Analysis::PerFieldAnalyzerWrapper is not available in
ferret_ext.
--
Sergei Serdyuk
Red Leaf Software LLC
web: http://redleafsoft.com
--
Posted via http://www.ruby-forum.com/.
2008 Apr 13
8
Brand new to rails: can't get databases to work
Just starting to learn rails. All is going well, until I tried to hook
up a database.
"undefined method `model'' for ZingerController:Class" is the message I
get from the server.
I imagine I''ve left something out that is keeping me from connecting
to the database, but I''m not exactly sure what.
Your help is appreciated.
bests,
-rsr-
session dump:
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 Oct 16
4
InstantRails and SQLite
Hy,
I''m using InstantRails for my RoR developments and it is really great.
However I have a little problem since a few days. Here is the
situation, I''m using InstantRails 2.0 with PHP 5.2.6 (I upgraded
following the InstantRails procedure). I''m using MySQL as a database
for my application but recently downloaded a forum (FluxBB) which need
SQLite to work. My problem is
2006 Nov 07
1
Memory consumption too high
Hi,
I''m having trouble with ferret and AAF blowing up with a NoMemoryError.
Sometimes when I add documents inside my rails app. Ferret starts
consuming huge amounts of memory. I''m on a machine with 2GB of memory
and it still runs out of memory. Sometimes I''m able to run
MyObject.rebuild_index and the memory doesn''t move up at all. However,
sometimes it
2006 Jun 23
1
Can not rescue ferret exception. What is wrong?
Hi,
I have a big index and wildcard query raises an exception. That is all
right. The problem is I can not rescue this exception and it bombs right
to user page. Why?
I am on Linux. Ferret 0.9.3 with C extentions.
>> class A
>> def self.b
>> Book.index.search(''isbn:00*'')
>> rescue
>> puts ''ok''
>> end
>> end
=>
2006 Apr 07
1
Upload corrupts images. Any ideas why?
Hi,
I have written upload action and it seems to be working in general but
image files consistently get corrupted. They differ in both content and
size.
I have uploaded a small text file without any problems.
Everything is running on my laptop, WEBrick is the server.
Code:
***********
begin
@filename = @params[''NewFile''].original_filename
2007 Nov 19
1
Capistrano in InstaRails bombs?
Following the book, I try:
cap --apply-to C:\CapPlanner\trunk\Source capplanner
And get in reply:
C:/InstantRails/ruby/lib/ruby/1.8/optparse.rb:1443:in `complete'':
invalid option: --apply-to (OptionParser::InvalidOption)
from C:/InstantRails/ruby/lib/ruby/1.8/optparse.rb:1441:in
`catch''
from C:/InstantRails/ruby/lib/ruby/1.8/optparse.rb:1441:in
`complete''
2008 Dec 23
1
server won't start!
Hello,
I''ve got an InstantRails 1.7 app (ruby 1.86, rails 2.1.0) that will no
longer start since I rebooted my windows server 2003 machine to complete
some windows updates. However, I also deleted some gems earlier today,
but it started right up perfectly fine. Anyway, here is whats happening:
C:\InstantRails\rails_apps\dejavu>ruby script/server
=> Booting Mongrel (use
2006 Oct 25
4
Instant Rails
I''m having a newbie problem getting Instant Rails to start WEBrick.
I''ve created a demo project by type Rails Demo at the InstantRails
command prompt. This worked fine.
I then navigate to the Demo directory and type ruby script/server. I
get the following errors...
C:\InstantRails\InstantRails\rails_apps\demo>ruby script/server
=> Booting WEBrick...
=> Rails
2008 Jul 24
0
Errno::EBADF Send an Email in Rails using GMail
Hi,
would someone please help me. I have been desperatley trying to fnd
out for the last two days why the following code is not working. Any
ideas.
I''m running Instant Rails 1.4 / Rails version 1.2.5 / Ruby version
1.8.5 (i386-mswin32) / RubyGems version 1.1.1 / Action Mailer version
1.3.5 / Windows XP.
Here is a description of my emailing application:
in