Displaying 20 results from an estimated 1100 matches similar to: "rails ignoring the migration file"
2006 Jan 01
11
Migration db_schema_import always fails.
I have not been able to get DB migrations to work at all in Rails 1.0
for me. On multiple platforms I continually get the same errors. It
took me awhile to figure out some initial things, such as Migrations
don''t seem to support Enum column types, and doesn''t really support
Foreign key relationships (the constraints at least). After changing
my DB schema to jive more with the
2006 Mar 04
1
active migration gives undefined_method ''string_to_binary''
has anyone ever seen that:
c:\rails\test>rake migrate --trace
(in c:/rails/test)
** Invoke migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute migrate
rake aborted!
undefined method `string_to_binary'' for
ActiveRecord::ConnectionAdapters::ColumnDefinition:Class
2006 Jan 08
1
uploading an image to a Rails app
Hi,
I want to upload a product image to my rails app. I only want to store
the file name in the database and the actual image file in
public/image/. This seems complicated with file_field. Any pointers or
links with explainations?
Thanks,
Peter
2006 Jan 30
5
Problems migrating from Postgres to MySQL
Hello everyone,
I''m trying to migrate a working app from Postgres to MySQL, and I''m
trying to use a migration to get it done rather than alter all my
database table creation scripts to MySQL syntax. I''ve done loads of
work with Postgres, but am a real newbie with MySQL...
I did a ''rake db_schema_dump'' from my Postgres app, and got a nice
looking
2008 Jun 24
9
ActiveRecord 2.1 Migration support
Hi all,
I am in the process of adding Migration support to the Ingres
ActiveRecord adapter and have run in to a problem. During the call to
create_table the Ingres adapter some how causes ruby to blow the stack
and coredump/segv. I have tracked down the problem down to
"add_column_options!" in
"lib/active_record/connection_adapters/abstract/schema_statements.rb".
2008 Jun 24
9
ActiveRecord 2.1 Migration support
Hi all,
I am in the process of adding Migration support to the Ingres
ActiveRecord adapter and have run in to a problem. During the call to
create_table the Ingres adapter some how causes ruby to blow the stack
and coredump/segv. I have tracked down the problem down to
"add_column_options!" in
"lib/active_record/connection_adapters/abstract/schema_statements.rb".
2006 Jan 10
5
problems overriding module with plugin
Hi I am trying to create a plug-in to fix the error in the rails core
produced by the multiple delete on a HABTM relationship. I have
confirmed that my plug-in is being included into the base during
runtime however the code does not seem to be overridding the base
class.
module ActiveRecord
module Associations
module ClassMethods
def has_and_belongs_to_many(association_id, options =
2006 Jan 09
4
How to carry parameters to a new page?
Hello,
I have a page where user can register him/herself to the site.
If the user enters something wrong, or leaves blank textboxes, I want to
reload the page and tell the user what went wrong. Also the
textbox-values the user already entered, should be kept in the
textboxes.
For example, in my user-controller:
if @username.length == 0
redirect_to :action =>
2006 Feb 02
3
acts_as_family_tree
For a project that I am working on I need to have a family tree. This
means that instead of having one parent each item has at most two. As
far as I know acts_as_tree only allows one parent_id. Any suggestions
on how to make a "acts_as_family_tree" ?
Thanks,
Mark
--
--------------------------------------------------------------------
I am Mark Daggett and I approve this message.
2006 May 30
1
rake db_schema_import on vanilla schema.rb
Hi all,
I dumped my schema from SQLServer 2000 without any problems. I then
tried to "rake db_schema_import" on MySQL 4. To do this i changed my
database.yml settings to use the mysql adapter (as it was set to use
sqlsever before) and attempted the import.
I haven''t changed a thing in the schema.rb script and, even though I do
have generated a migration, I think I
2005 Dec 02
3
Conceptual Design Question
Hi All,
I am making a DAM (seems to be the hip thing to do these days). It is
for the company that I work for. We have some really weird domain
rules that have prevented me from just using a simple directory
structure file permission system. I have come up with a solution but I
wanted to run it by you gurus to ensure that I am not recompiling the
wheel here.
Basically the domain rule is:
A user
2006 Mar 25
2
acts_as_tree wierdness with children.count and children.size
i am making a category tree and i iterate over the category using my
counter_cache however it would show a different number than what was
actually being represetned in the tree.
Here is an example
cat.children = [cat2, cat3]
puts cat.children.size 2
puts cat.children_count 2
cat4.parent_id = cat.id
cat4.save
puts cat.children.size
2006 Jan 12
3
url_for in tests
Hi there,
I''ve added an extra bunch of testing features for doing in-browser
testing with Selenium, and am having quite a time figuring out how to
use url_for with having a controller object present. I''ve tried using
ActionController::Base.url_for and
ActionView::Helpers::UrlHelper.url_for but haven''t been able to get
something that works.
What I want to be able
2005 Dec 22
3
acts_as_stateless ?
Is there such a thing that I could use to store sessions in the DB
instead of in a cookie so that I can ensure users will be able to
access their session data even across several load balancers? We use
totally stateless machines here at work and I am worried about
deploying a rails app in production that uses a volitile session
stored on the machine.
Any help is great!
Happy Holidays,
Mark
--
2006 May 04
5
create databases with rake
hi,
is there a way to create the database (say development and or
production) specified in database.yml with rake?
thanks,
Enrico
--
"The only thing necessary for the triumph of evil
is for good men to do nothing"
Edmund Burke
2006 Feb 10
7
convert rails object to javascript variables
Am i a total idiot to try and parse out a rails object for javascript
in this way?
<%
for i in interface_items[0].attributes
%>
var <%= i[0] %> = "<%=h( i[1] )%>"
<%
end
%>
Am I missing something really obvious?
Thanks,
Mark
--
--------------------------------------------------------------------
I am Mark Daggett and I approve this message.
2006 Jan 26
9
Problem with schema_db_import on Site5?
Hello,
I am trying to put my rails app on a host .So I presume the method to do
this is to first do
rake db_schema_dump and then copy it to the host and do
rake db_schema_import.
I use mySQL Ver 14.7 Distrib 4.1.14, for pc-linux-gnu (i686) using readline
4.3
** Invoke db_schema_import (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db_schema_import
rake
2006 Apr 11
2
Schema.rb and MySQL decimal
Hi,
I have a mysql schema with some decimal(20,20) fields. Now, I made a
rake db_schema_dump for deployment of my applications on other machines.
Rails created a schema.rb with the decimal fields as float.
After a rake db_schema_import the fields are just float not decimal. How
can I force rails to create decimal(20,20) columns instead of float?
Thx.
Marc
--
Posted via
2006 Oct 19
3
Selecting datetime values from SQL Server (year < 1970)
All,
Rails 1.1.6.
Any AR find() call that generates a SELECT * type query against a table
with a DATETIME column in SQL Server whose value occurs before 1970 will
fail, because of the coercion of SQL Server datetime types to Time
values in Ruby.
See sqlserver_adapter.rb line 490
(record[col] = record[col].to_time if record[col].is_a? DBI::Timestamp)
If I remove the coercion (just commenting
2006 Mar 23
2
rails 1.1 and mysql errors
Hi,
I just upgraded to rails 1.1 this morning and i am getting a variety of
errors from tests that were passing effortlessly on the previous edge
release (i froze several weeks ago, so I not sure what version that was).
Has anyone else experienced these types errors with the new rails:
I have several errors that are grouped around create and destroy commands
the errors are similar, first the