Displaying 20 results from an estimated 6000 matches similar to: "SQLite in small production environment"
2006 Feb 24
2
sqlite sets a new model''s id to 0 after a save
Example:
car = Car.new
car.id # is nil
car.save
car.id # is 0
I''m wondering if this is expected behavior, or something wrong with
what I''m doing. If it is not expected behaviour, how do I go about
solving it?
2006 Feb 28
6
How To Validate Boolean Form Field
Hello all.
I''ve got the following in my model:
class Individual < ActiveRecord::Base
validates_presence_of :first_name, :last_name, :street, :city,
:state, :zip
validates_acceptance_of :AZ_resident, :message => "You must be an
Arizona resident."
end
The AZ_resident field is present and defined as boolean (PostgreSQL
8.1), but validation will not occur.
2006 Mar 03
7
Meta Programming Help
I have the following two methods:
def ProductFile::find_images(mode, prod_id)
# convert to symbol in case it is not (most commonly it may be a String)
mode = mode.to_sym
case mode
when :all, :first
ProductFile::find(mode, :conditions => ["product_id = ? AND
file_type LIKE ?", prod_id, "image%"])
end
end
def ProductFile::find_documents(mode,
2010 Mar 10
2
Windows API to connect UnixOdbc is not functional in Wine
Hello,
I have configured Wine in Ubuntu 9.04 to use the built-in odbc32.dll which in turn uses the Linux's unixodbc package.
When I am trying to run my windows application which actually uses Windows API connecting to Unix ODBC is not working.
The API uses is SQLDriverConnect (), that returns me error
[unixODBC][Driver Manager]Can't open lib '/usr/lib/libtdsodbc.so' file not
2009 Apr 17
3
OT : SQLite or another database engine with a small application?
People,
I have been thinking at this for long time and I do not know
if SQLite is sufficient for my application.
I developed an inventory system in Rails -v 2.2.2 and I do
not know if SQLite is the best choice or if is neccesary have a bigger
database engine than SQLite..
This site will not has thousand and thousand records or
visits each day so I think with SQLite could
2006 Mar 13
3
unit tests executed for every page load ?
After I installed the very sweet file_column plugin I get strange output
on my html pages. At the very end I always get something like this:
"Loaded suite dispatch.cgi Started Finished in 0.000218 seconds. 0
tests, 0 assertions, 0 failures, 0 errors "
Seems like there is executed a non existent test suite for every page
load. Can anybody help me find the lines that force this
2006 Mar 03
5
avoiding nil object error?
I''m a total Rails newbie and i''ve been struggling for hours today
with one (prolly very silly) problem:
I have a table portfolios that has many images:
class Portfolio < ActiveRecord::Base
has_many :images
end
class Image < ActiveRecord::Base
belongs_to :portfolios
end
In the controller i define a list of active portfolios:
@active_portfolios =
2006 Mar 02
17
can''t get rails to connect to mySQL - HELP!!!!!!!!!
Sorry, but this is really NOT as easy as the tutorials/books make out.
I''m really struggling at the first hurdle here. And while I''m not a
programmer by design I do know my way around most stuff. And if I can''t
get this to work I suspect more people will have the same issues. There
seems to be too many variables to address.
I have winXP, I have ruby and rails all
2008 Sep 23
2
rsync many small files
At our lab we have storage with many small files. For example a
directory can contain over 15,000 files and each file averages about
75k. I would like to sync this to another filesystem on a different
server but I am not sure if there is a rsync tuning flag I can use for
such a intensive job. I am using rsync 3.0.3. Also, I would like to
use little memory as possible.
Any thoughts? TIA
2006 Mar 02
2
How to get mime extension with file_column
Is there a way to get the MIME extension of a file_column field?
Here''s what I want to do (look for comment in before_save method):
class ProductFile < ActiveRecord::Base
belongs_to :product
file_column :file_name
def before_save
self.file_type = # something that returns the MIME type (e.g. image/jpeg)
end
end
TIA
2006 May 03
2
How do you use the ''vendor'' directory with 3rd party libraries?
Hi,
I''m wondering how to use the ''vendor'' directory in a Rails app. I
know that you can put plugins and engines into the ''vendor/plugins''
directory and that svn:externals can be used for that, but I was
wondering how & where I put a 3rd party library? My specific case is
the pdf-writer code, which I''d rather have inside my app than as a
2006 Feb 27
3
Newbie Question
Hi! I just ran the first few Rails tutorials and I''m really impressed
at how quickly I was able to get something up and running.
I''m slowly emerging from the stone ages, and leaving my powerbuilder
behind ? yes, I know, keep the snickering to a minimum please! I
started into J2EE/STRUTS, but was quickly frustrated by how long it
would take to code anything but relatively
2005 Mar 12
0
[OT] Updating a production sqlite database
Hi,
I''ve decided to use sqlite3 to power my rails app. But I''m having
difficulities trying to figure out how I should perform upgrades on
the database once the site goes live.
A minute or two of downtime is no big deal and the database doesn''t
have inserts or updates all that often. But what if inserts and
updates happened a lot, or uptime was crucial? What are good
2009 Oct 01
3
sqlite limit
Hi All,
I am working on a POC that I''d like to show a group of 10 to 15 folks.
I was wondering if sqlite would do for db with about 20 people hitting
on the application. Does sqlite locking the entire db while writing
manifest itself in such scenario?
Regards,
Kashyap
2006 Oct 10
1
Python/sqlite date time problems.
Bear with me, this is CentOS related. :)
I have a python CGI that's behaving weirldy on Whitebox systems
that've been switched over to CentOS 4 (ages ago, no other problems to
speak of aside from this one).
I've broken the problem down to a minimal test case...
1. Create a small database
# sqlite3 /tmp/testcase.db 'CREATE TABLE testtable ( date date primary
key unique, name
2006 Feb 28
7
windows sqlite client?
Hi all,
Does anyone know a good windows client for sqlite 3? typical use is create
and modify tables and export creation queries.
Thanks,
Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060228/363834cf/attachment.html
2005 Apr 15
1
How can I change SQLite cache size for R session?
How can I change SQLite cache size for R session?
SQLite cache size can be set by a pragma, for the
duration of the session - or by default.
.pragma cache_size
.pragma default_cache_size
my questions are about RSQLite, version 0.4, running
on Windows:
- what is the cache size set to when SQLite is
invoked from R?
- if the page_size is set to 4096 what will be the
cache size in bytes
2005 May 08
3
sqlite, views, incorrect data types?
This has been driving me crazy for a few days now. I am using sqlite3
however I have also found this to be the case with 2.8.15:
I have data types text or integer on every column of every table in
the database. Now i know sqlite doesnt care much about data types,
but I believe rails does (correct me if im wrong). On pages that
query a table, everything is perfect.
BUT when I use a view
2020 Aug 26
2
[supermin PATCH] rpm: check for SQLite-based RPM DB
Fedora 33 switched the DB of RPM to SQLite, so no more Packages/Name/etc
files. Because any missing file exception is ignored when checking for
--if-newer, the lack of the Package files was not properly noticed, so
the appliance was always considered out out date.
Check for the SQLite-based DB first, falling back to the old format.
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
---
2006 Feb 14
2
sqlite and migrations question
I am attempting to start my new application using the migrations feature
of rails. I''m not new to databases but new to SQLite.
My question is that starting with noting it appears I have to create a
table in the SQLite console and then use migrations to delete that table
and add more tables. Surely it should be possible to create a blank
SQLite database that I can then use migrations