search for: dbfile

Displaying 20 results from an estimated 41 matches for "dbfile".

Did you mean: db_file
2016 Aug 18
1
[PATCH] v2v: linux: simplify RPM database cleaning
...rt_linux.ml index f9aa334..9941750 100644 --- a/v2v/convert_linux.ml +++ b/v2v/convert_linux.ml @@ -85,9 +85,7 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps = Linux.augeas_init g; (* Clean RPM database. This must be done early to avoid RHBZ#1143866. *) - let dbfiles = g#glob_expand "/var/lib/rpm/__db.00?" in - let dbfiles = Array.to_list dbfiles in - List.iter g#rm_f dbfiles; + Array.iter g#rm_f (g#glob_expand "/var/lib/rpm/__db.00?"); (* What grub is installed? *) let grub_config, grub = -- 2.7.4
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
2006 Sep 26
1
Error while generating scaffold
...lite) entered the products table with the following SQL: create table products( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title varchar(100) NOT NULL, description text NOT NULL, image_url varchar(200) NOT NULL, price money(10,2) NOT NULL ); My database yml contains: test: adapter: sqlite dbfile: db/test.db production: adapter: sqlite dbfile: db/prod.db development: adapter: sqlite dbfile: db/dev.db And the db files are indeed in the rails db dir. Ruby version: 1.8.5 Rails version: 1.1.4 OS: Mac OSX 10.4.7 Ruby, rails and SqLite are isntalled by darwinports. Not by gem, since Da...
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
2008 Oct 08
11
Using image_tag and send_data
...e_tag to load an image that I''ve saved to the database (using attachment_fu if you''re curious but that''s probably not relevant here): VIEW <%= image_tag ''/photo/get_image/5'' %> CONTROLLER def get_image @photo=Photo.find(params[:id]) send_data(DbFile.find(@photo.db_file_id).data, :type => @photo.content_type, :file_name => @photo.filename, :disposition => ''inline'') end The images I''m saving are less than 100kb and easily hand...
2008 Jul 30
6
Need help
Hello, Can someone help me to understand the meaning of the following R line? list(fk5 ~ .) Thanks, Renata ----------------------------------------- Email sent from www.virginmedia.com/email Virus-checked using McAfee(R) Software and scanned for spam
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 "queue_log" ("time" TEXT, "data1" TEXT, "data2" TEXT, "data3" > TEXT, "data4" TEXT, "data5" TEXT, "event&quo...
2005 Jun 29
3
trouble with active record and sqlite
...me trouble: require ''active_record'' db_name = Time.new.strftime("db/xy-%M%S.sqlite") # connect to the database (sqlite in this case) ActiveRecord::Base.establish_connection( "adapter" => "sqlite3", "dbfile" => db_name) statement = "CREATE TABLE tests (id int not null primary key, x int, y int)" begin ActiveRecord::Base.connection.execute(statement) rescue ActiveRecord::StatementInvalid end # define a simple model class Test < ActiveRecord::Base end t1 = Test.new(''...
2006 Mar 31
14
[newbi] Create a Model
...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 hashing: # http://dev.mysql.com/doc/refman/5.0/en/old-client.html development: adapter: sqlite dbfile: db/expense_developement # Connect on a TCP socket. If omitted, the adapter will connect on the # domain socket given by socket instead. #host: localhost #port: 3306 # Warning: The database defined as ''test'' will be erased and # re-generated from your development databa...
2006 Jul 09
1
connecting to sqlite3
I''m having problems connecting to sqlite3. Here is what my config file looks like: development: adapter: sqlite3 dbfile: /tmp/db/test.db test: adapter: sqlite3 dbfile: /tmp/db/test.db Running migrations causes this error to be thrown: g4:~/sites/rails/test smtlaissezfaire$ rake migrate (in /Users/smtlaissezfaire/Sites/rails/test) rake aborted! no such file to load -- sqlite3 The database exists at /tmp/db/te...
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/.
2012 Mar 17
0
tryCatch interferes with traceback(), debugger(), dump.frames()....
I want to use tryCatch, but tryCatch seems to obscure important things I need for debugging. For example, say I am working with an SQLite database, and have written this function: debugThisFunction <- function(dbfile) { require(RSQLite) drv <- SQLite() conn <- dbConnect(drv, dbfile) tryCatch({ dbBeginTransaction(conn) tryCatch({ for (i in 1:10) { somethingWhichCrashesSometimes() } }, error = function(e) {dbRollback(conn); stop(e)}) dbCommit(conn) }, finall...
2016 Oct 20
2
queue_log/cel sqlite
hi, is it possible log cel/queue_log to sqlite? via odbc? any experience? marek
2006 Feb 08
1
Save only inserts null instead of actual values
...gt; ''list'' else render :action => ''new'' end end end end model: class Collection < ActiveRecord::Base has_many :subcollections attr_accessor :name, :description, :index_date end database.yml: development: adapter: sqlite3 dbfile: db/dev.db development.log - after submitting data with the form Processing CollectionController#create (for 127.0.0.1 at 2006-02-08 22:13:53) [POST] Parameters: {"commit"=>"Opslaan", "collection"=>{"name"=>"dqsfqds", "description...
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?
2012 Aug 31
1
after_fork - ActiveRecord::AdapterNotSpecified
....3.2), activerecord (3.2.6), ruby 1.9.3p194 The app (test.rb): require ''rubygems'' require ''sinatra'' require ''active_record'' ActiveRecord::Base.establish_connection( ? :adapter => ''sqlite3'', ? :database => ''/tmp/dbfile'' ) class User < ActiveRecord::Base end get ''/'' do ? @users = User.all ? "This is a Sinatra test. We have #{@users.count} users." end The config.ru require ''./test'' run Sinatra::Application The config/unicorn.rb @dir = ''/home/fran...
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 Jun 15
6
Sqlite3 test fails in Rails app
...iencing the same result using Sqlite3? I am using sqlite3-ruby version 1.1.0 and Sqlite3 version 3.3.5-r1 on a Gentoo linux system. All of the CRUD actions in my application work just fine, so I don''t know why the tests are bombing out with this error. I am using the correct adapter and dbfile in the database.yml file, so the "missing database" error should not be the case. Thanks for your help! Tyler Morten
2005 Oct 30
1
attaching the debugger to functional test.
...uot;hello" end def test10 assert_equal @string10, "hello" end end The following command line works great: ruby -r debug bikle_test.rb Next, I create a new rails application with this command line: rails rtest Then, I create a database.yml: test: adapter: sqlite3 dbfile: db/rtest.db Then I copied bikle_test.rb to... rtest/test/functional/ I altered it a bit so it behaves like a typical Rails test: # # bikle_test.rb # require File.dirname(__FILE__) + ''/../test_helper'' class BikleTest < Test::Unit::TestCase def setup @string10 = &quo...
2006 Jul 07
2
Errno::ENOENT in RecipeController#new
I''m brand new to Rails and I''m trying to work through the ONLamp.com Rolling with Ruby on Rails tutorial. I''m trying to connect to my mysql database and I''m getting the following: <i> Errno::ENOENT in RecipeController#new No such file or directory - /tmp/mysql.sock RAILS_ROOT: /home/jason/rails/cookbook/public/../config/.. Application Trace |