similar to: loading data with migrations

Displaying 20 results from an estimated 3000 matches similar to: "loading data with migrations"

2005 Dec 29
3
migrations
I''m trying to understand migrations and here is my problem, lets take this example code from the API docs for migration. This code creates a table then adds a new row to it, my problem is how can this add a row to the table if the model doesn''t exist and how can you create a model if the table doesn''t first exist. Can the migrations also be told to create a model for a
2005 Nov 25
2
Wx::SystemSettings mark II
hi patches and files for Wx::SystemSettings, with get_font included in swig file and a sample that doesn''t segfault wxruby. CVS patches: RubyConstants.i, type_map.i CVS new: system_settings.rb (sample) SystemSettings.i (SWIG file) The sample should allow you to view the available information about system colours, fonts and metrics (eg cursor size, display size) in a Grid.
2006 Apr 04
4
How to read rails documentation
One of the criticism I have heard about rails is that the documentation is bad. I must admit I have a hard time trying to follow it and I wonder if anyone can shed some light on it for me. For example, I am looking at the schema.rb file generated and I noticed this line: create_table "accounts", :force => true do |t| I thought to myself, what does :force => true mean? So I
2006 Jun 19
1
AWDwR2: Loading data in migrations
The new chapter in Agile Web Development with Rails talks about using migrations to load data from fixtures. This is a great idea, I''ve wanted to do this. This allows you a good way to create sample data that you can use during development, testing or demoing of an application. My question is how do you keep it separated from the real data? For example, say you have a User and Account
2006 Mar 27
3
Migration commands -- create a SQL Server production DB?
Hallo -- could anyone tell me how I use Migrations (which my existing development schema is implemented with) to create the production database for deployment? The target DB is a SQL Server database -- I don''t know if that''s an issue -- I seem to remember reading that SQL Server is supported now. Oh, yeah -- SQL Server was *not* my choice! But what I seem totally unable to
2006 Jul 15
6
Subversion and migrations confusion
I''ve spent the last several months learning RoR and building my first app. I''ve not used migrations yet and honestly don''t understand them much, and have not had my app under version control. I''ve decided it''s time (I know, some will say way past time ;-) ) to put the app under version control. I''ll be using Subversion and have begun working
2006 Feb 26
1
Migrations: column option "offset"?
Hi, On the wiki http://wiki.rubyonrails.com/rails/pages/UnderstandingMigrations it says: Valid column options are: - limit - offset - null (i.e. ? :null => false? implies NOT NULL) - default (to specify default values) I was wondering what the purpose of the "offset" option is. And after looking at the API at
2005 Nov 30
1
No matching function for overloaded ''wxWindow_GetTextExtent'' on Linux
Hi guys, I get this error when I try to edit an item in the grid: dewd@marieta:/mnt/workspace/tpl_src/src/wxruby2/samples/etc$ ruby system_settings.rb Our Initialize was called Their Initialize returned 1 system_settings.rb:245:in `get_text_extent'': No matching function for overloaded ''wxWindow_GetTextExtent'' (ArgumentError) from system_settings.rb:245 I have
2006 May 31
7
How do you create a controller & view to create a list of objects?
I''m trying to figure out how to design a view and controller to work with a simple collection. I have a Foo that has many Bars, so here''s what I did: $ ruby script/generate model Foo $ ruby script/generate model Bar (Uncomment t.column, :name: :string in foo and bar migrations) (Edit Foo.rb and Bar.rb, add has_many :bars to Foo, belongs_to :foo to Bar) $ rake db:migrate $ ruby
2006 Jan 25
2
Setting up deployment scenario
I am familiar with using RoR in a pure development environment, that is to say that I can create a local project, access it via a web browser, update the database, etc. However, I''m having trouble figuring out how to best set up things with actual deployment in mind. Forgive me if this has been asked before, I couldn''t find it easily. Right now I have a subversion repository
2006 Aug 14
5
UML
In Rolling with Ruby on Rails tutorial - http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html - I saw that to introduce a new element to my domain, I needed to define it in a table, generate a model element with a similar name and the class would autoamtically take the attributes from the table definition. Is it possible to do this in the other direction... i.e to take the class diagram
2006 Feb 21
2
Managing Database Alter Scripts
I just posed this question to #subversion, with no reply. Any thoughts here? I''m trying to decide how to manage database changes w/ subversion. I''ve got a large number of production checkouts of a branch (actually, multiple branches). Of course I have a base script to create the schema, and this is updated of course when new fields are added to the system. When a new field
2006 Feb 25
1
Migrations for initial schema: Where to put initial data?
Hi, I''m trying to get my head around using migrations to define my initial schema. When using migrations, I want to: - Avoid creating a new migration for every small change. Limit it to one migration per checkin. - When creating a new (fresh) schema, I do not want to go through the overhead of all the migrations. These are the steps I came up with, to create the initial schema: 1.
2006 Jun 01
3
rake create_sessions_table, does not create session table
when i run rake create_sessions_table, I get following output. tables donot get created and my application doesnot start. (in G:/rubysrc/blog) create db/migrate create db/migrate/001_add_sessions.rb info: the first time ran take everyting was fine, but now i have reinstalled ruby and rails and created the database, but i am unable to create session table with rake, please help.
2006 Jan 14
6
Error installing Rails/FastCGI/Apache2
Trying to install rails/fcgi/apache2. Following these instructions: http://xmlareas.com/ruby-rails-howto.html Using Fedora Core 4. I installed ruby and ruby-devel using apt-get. Everything under Adding FastCGI (optional) works fine up to the gem install fcgi part. Here is what happens: [root@paulbarry fcgi-2.4.0]# gem install fcgi -r -- -with-fcgi-lib=/usr/local/fcgi/lib
2006 Aug 14
8
How search engine friendly are RoR sites?
I am a total RoR virgin, and took my first steps this weekend into the Ruby world. A lot of sites I create need to be as SEO friendly as possible, particularly for google. Before I delve any further, can anyone tell me how friendly the dynamic URLs or if there is the usual rewrite mod for rugby? Thanks Mike -- Posted via http://www.ruby-forum.com/.
2006 Apr 04
2
Pagination and Parent Conditions
Can I do any "fancy" conditionals when using the Pagination helper? The problem is that I want to be able to specify a conditional based on the criteria of a parent object. Here''s an example: Object A has_many Object B''s I want to paginate through 100 B''s but I *only* want it to return the ones who''s A.flag = true I poked around through the Wiki
2007 Jan 20
3
Making tables with SQLight
Hi, Im using locomotive and running SQLight. Im confused about making tables with sqlight. Im following the depot example from ''agile web development with rails''. When trying to make the table ''products'' is there a difference when using SQLight rather than MySQL? Here is the DDL for MySQL, how do I make this table with SQLight? - drop table if exists
2006 May 25
24
Make these a prt of Ruby on Rails!
3 things that should be part of the main Rails tree: http://www.redhillconsulting.com.au/rails_plugins.html Views? -- Posted via http://www.ruby-forum.com/.
2006 Aug 01
5
how do set default value for ActiveRecord fields?
Everytime a new record object is created i.e. Record.new, i want certain fields to be the same. Any idea how to do this? Thanks Chris -- Posted via http://www.ruby-forum.com/.