similar to: migrations and SQLite

Displaying 20 results from an estimated 10000 matches similar to: "migrations and SQLite"

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
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 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
2006 Mar 19
4
elemental race conditions question
What''s the standard way to prevent race conditions in controllers? Say user has many posts. Post controller has action add_post that receives user id, post controller find()s the user and while he is creating the post entry an administrator deletes that user in a separate session. We cannot assume the database checks foreign key integrity. How do you get that right? -- fxn
2006 Jul 17
5
quantic phenomena in migrations
I have an application with 15 migrations under version control. In a Mac and and in a Windows, a rake migrate from scratch runs them all just fine. But in a different Windows machine rake migrate stops after migration 3 for no apparent reason. --trace seems normal. No error is reported. Both Windows are XP SP2. They all have the same svn revision and Rails-related software, database is
2006 May 15
11
can you explain this benchmark?
I want to load about 14000 words (a subset of /usr/share/dict/words) into a MySQL table in a migration: class CreateWords < ActiveRecord::Migration def self.up create_table :words, :force => true do |t| t.column :word, :string end say_with_time ''loading words...'' do words = File.join(RAILS_ROOT, ''db'',
2006 Feb 11
5
after_(read|find) callback?
I am pondering the possibility of encrypting/decrypting some fields in a SQLite backend on-the-fly. The point of the message is not security, I know that''s broken, but whether there''s a technique that provides on-the-fly save/read filters. Of course the solution would need to work transparently in joins, so user.posts.last.title would do the right thing if title
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 Feb 04
22
What''s the best way to embed a form?
I would like to embed my login form on my app''s home page. What''s the best way to render the login action of member controller from another action? Thanks Frank --------------------------------- Relax. Yahoo! Mail virus scanning helps detect nasty viruses! -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Feb 19
4
is "display" a reserved name of some sort?
A view display.rhtml sees no controller state variables set in the corresponding display action. Why? -- fxn
2013 Nov 06
6
Feature: make capitalization optional in *humanize*
According to the documentation<http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-humanize> of ActiveSupport::Inflector: *humanize*(lower_case_and_underscored_word) Capitalizes the first word and turns underscores into spaces and strips a trailing “_id”, if any. * Example: humanize("employee_salary") # => "Employee salary"* I would
2006 Apr 05
5
when is model() needed?
I have just some vague and thus probably wrong ideas about when to use model() in controllers, and by now I err on being redundant. I don''t post them here to avoid leaving anything that may be false in the archives. Can anyone explain exactly in which cases one should use model()? -- fxn
2006 Mar 04
13
Using helpers from controllers ?
There is a solution to use helpers from controllers ? I have an error : |undefined method `content_tag''| class ApplicationController < ActionController::Base def test return content_tag("a","test") end end
2010 Jul 24
23
How to disable ORM in Rails 3
Is there any way to prevent Rails 3 from using an ORM? In Rails 2, it used to have a description in environments.rb explaining how to do that. In Rails 3, is there any way to tell it to not use any database? I was trying to make some benchmarks from situations that don''t require a database... Thanks in advance, Rodrigo. -- You received this message because you are subscribed to
2006 Dec 07
17
compress and max upload size?
I am using mongrel_cluster with mod_proxy_balancer and would like to enable compression (assuming it improves throughtput) and limit file size upload. I configured mod_deflate and LimitRequestSize in Apache, but in my trials looks like the proxied calls bypass those directives (the conf goes below). Is there a way to get this? -- fxn # Adapt this .example locally, as usual. # # To be
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 Feb 07
3
help with relationship
Let''s imagine we are modelling a company that have several shops. I have a Worker model and a Shop model. A worker belongs_to a shop, and each shop has_many workers. But, in a shop there''s a distinguished worker that is the supervisor create table shops ( ... worker_id integer -- the supervisor ); How would you express this relationship?
2006 Apr 23
18
Applications used in the Rails video?
Hi all, I just watched the rail video: http://www.rubyonrails.org/media/video/rails_take2_with_sound.mov I am just curious. I can tell that the video was done on a Mac, but I cannot tell which applications were used for editing the code, and for interfacing with MySQL database. As far as editing source code, I normally use BBEdit (I''ve used it since 1994), but the editor used in
2006 Jul 17
18
Inserting datetime value into SQL Server
I have a SQL Server column named StartTime of (SQL Server) type datetime If I attempt to set the attribute using public def StartTime=(time) write_attribute(:StartTime, "{ts ''1899-12-30 #{time.hour}:#{time.min}:#{time.sec}''}") end it''s inserting a NULL value. Anyone else able to successfully insert a date time value into a SQL Server table using
2006 Apr 10
4
has render_component changed?
I have an application that worked fine, but after the recent updates has broken in some calls to render_component from views. I might be missing something but as far as I remember Rails updates is the only thing I''ve done in between. See the log: *** START LOG SNIPPET Start rendering component ({:params=> {:center_id=>10, :id=>25},