similar to: message board help

Displaying 20 results from an estimated 2000 matches similar to: "message board help"

2008 Feb 19
1
[CruiseControl] RubyOnRails build 8896 failed
The build failed. CHANGES ------- Revision 8896 committed by bitsweat on 2008-02-19 02:56:05 Don''t assume all records from nested include are of same class. Closes #11154 [acechase] M /trunk/activerecord/lib/active_record/association_preload.rb A /trunk/activerecord/test/cases/associations/eager_load_nested_include_test.rb TEST FAILURES AND ERRORS ----------------------- Name:
2008 Apr 08
1
Help with primary_key_prefix_type
I put this config in environment.rb # Use table_id instead of id for primary key. config.active_record.primary_key_prefix_type = :table_name_with_underscore I have this migration: class CreateEntities < ActiveRecord::Migration def self.up create_table :entities do |t| t.string :entity_name, :null => false, :limit => 40 t.string
2008 Jan 14
1
How do I add autoincrement?
Hello, I am attempting to learn Ruby on Rails. I''m using Instant Rails 2.0 on a Windows computer. I really want the id number to autoincrement, but I am not sure how to do that. The script that''s generated after the scaffold is listed below. Any help is appreciated. class CreateMenuitems < ActiveRecord::Migration def self.up create_table :menuitems do |t|
2011 Mar 22
2
Problems with SQLite3
Hi! I''ve got a very strange problem. Suddenly the SQLite3 Backend stopped working. Example 1: > rake db:rollback == CreateProducts: reverting ================================================= -- drop_table(:products) rake aborted! An error has occurred, this and all later migrations canceled: SQLite3::SQLException: near "CASCADE": syntax error: DROP TABLE
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 *
2009 Jul 04
3
scaffolding
hi , i used the folllwing command to scaffold, G:\my\webblog>ruby script/generate scaffold webblog id:integer title:string body :text created_at:datetime after when i migrate with the follwing command rake db:migrate i got the error as (in G:/my/webblog) == 1 CreateWebblogs: migrating ================================================ -- create_table(:webblogs) rake aborted! Mysql::Error:
2009 Sep 30
3
SQLite3::SQLException: id may not be null
I am getting the following error using sqlite3. If I ran the same query directly in sqlite3 client, the data is saved without error. Same is happening for every table during inserts. SQLite3::SQLException: sessions.id may not be NULL: INSERT INTO sessions ("updated_at", "session_id", "data") VALUES(''2009-09-30 02:28:45'',
2012 Feb 14
4
What I'm doing wrong, has_and_belong_to_many
Hello, I''m trying to insert into my migrate but when I try on rails console this error shows: 1.9.3-p0 :001 > group = Group.new => #<Group id: nil, name: nil, description: nil, created_at: nil, updated_at: nil> 1.9.3-p0 :002 > group.name = "Group Name" => "Group Name" 1.9.3-p0 :003 > group.description = "Description" =>
2006 Aug 08
0
Error is: Couldn''t find Producttype without an ID
I am at a lost for what is going on here-------I have a producttypes and categories table. prodtype_id is a foreign key in categories table that references producttypes table. Below is how I am tyying to display it and get the above error. Any suggestion </p> <b>Product type:</b><br/> <select name="Category[prodtype_id]"> <%
2009 Apr 25
5
SQLite3::SQLException: unable to open database file
Hi. I was trying to code same as the rails guide : getting started. I could follow steps to 6.3 Working with Posts in the Browser. (setting home page, creating a resource, running a migration) After clicked create button, errors are occured. SQLite3::SQLException: unable to open database file: INSERT INTO "posts" ("name", "created_at", "title",
2006 Mar 29
2
Rake Migrations for Rails 1.1
Hi all. I keep having the following error when I invoke the rake db:migrate command for Rails 1.1 (Ruby 1.8.2 -- Windows 2000) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == Realtorex: migrating ======================================================= -- create() rake aborted! undefined method `create'' for
2009 Sep 07
11
autoincrement for non-id column
There is a table: execute (<<-SQL) CREATE TABLE "tasks" ( "id" serial primary key, "number" serial, "version" integer DEFAULT 0 NOT NULL, "latest_version" boolean DEFAULT ''t'' NOT NULL, "hidden" boolean DEFAULT ''f'' NOT NULL, "type" character varying (1) NOT
2009 Feb 22
2
Mysql error unknown column 'columns.user_id'
Had this error when trying to add comments to another user''s photo. ActiveRecord::StatementInvalid in User photosController#show Mysql::Error: Unknown column ''comments.user_id'' in ''on clause'': SELECT photos.`id` AS t0_r0, photos.`user_id` AS t0_r1, photos.`title` AS t0_r2, photos.`body` AS t0_r3, photos.`created_at` AS t0.... I did create a user_id
2009 Oct 13
2
Single Table Inheritance (STI) Broken: NameError
Some how I''m getting NameError: uninitialized constant when accessing a child models that inherits form the parent model. However, if I access the parent model first, then the child model is resolved. What am I doing wrong? My steps are below... Thanks, Francis. > ./script/generate model Blah type:string class CreateBlahs < ActiveRecord::Migration def self.up create_table
2011 Apr 05
4
Rails 3.0.5 gives SQLite3::SQLException for the same code that works on 3.0.3
Hello, I recently updated Rails to 3.0.5. The very same code that worked on 3.0.3 now gives error. The code is: def kategorialista Kategoria.where(:elfogadva => TRUE).order("nev").collect {|s| [s.nev, s.sefuri]} end It is in application_controller.rb with helper_method :kategorialista The error it gives on 3.0.5: SQLite3::SQLException: no such table: kategoria: SELECT
2007 Jul 08
2
datetime_select, is creating an instance of the Time class
Hello It seems that datetime_select, is creating an instance of the Time class. Why would that be? I found this while building a site where people can create vigils (prayer vigils, peace vigils, etc). When I added a validation method that compared start_date to created_at, it generated the error: ArgumentError (comparison of Time with DateTime failed): I was able to put a breakpoint in the
2008 Sep 18
1
"xxx_id may not be null" when saving many to many joined objects
Hi, I have two model classes; Tune and Title and they are joined in a many to many relationship through a Variation class. Here''s some stub code of the models: class Tune < ActiveRecord::Base has_many :variations, :dependent => :destroy has_many :titles, :through => :variations ... class Title < ActiveRecord::Base has_many :variations, :dependent => :destroy
2008 Apr 09
1
rspec SQLException problem
hello: I just installed rspec 1.1.3 by doing this: gem install rspec and then in the root of my project, I did this: ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails And now, when I run a unit test (that worked before the rspec installation), I''m getting the following errors: SQLException: near ''of'': syntax error: DELETE FROM
2006 Sep 14
0
Lost default value of timestamp field.
I''m using postgresql, I found some problems when running unittest. file: db/migrate/001_create_post.rb: -------------------------------------------------------- class CreatePosts < ActiveRecord::Migration def self.up execute <<-EOS create table posts ( id serial not null primary key, title varchar(255), created_at timestamp not null
2008 Dec 05
0
Bug in schema.rb generation during db:migrate
I am thinking that I have found a bug in Rails migrations. My app is using UUIDtools to generate guids for primary keys. To do this I pass :id=>false and then create my own id column as shown below. Next I leverage "execute" to create an index. It seems to work fine. The table in MySql is perfect. However the ID column and primary key on the ID column are not in the schema.rb file I