Displaying 20 results from an estimated 4000 matches similar to: "rake migrate says table already exists"
2006 Jun 22
2
id column for join table... kosher?
I''ve got two tables, bookmarks & tags. Using a
has_and_belongs_to_many association, I can do lookups using a join
table called bookmarks_tags. Two questions:
1. Can I have a migration for my join tables? Rails seems to "know"
about join tables implicitly from the associations, but if I do a
rake migrate the join tables won''t be built. I''ve been
2006 Aug 14
1
rake test:units -> table already exists
Hi!
When I run test:units, rails complains about the tables already being
present. They had to be present so I could run individual unit tests. So
why doesn''t rails just drop the tables if they exist?
Any ideas??
Jeroen
debug oupt below:
>rake test:units --trace
(in ...)
** Invoke test:units (first_time)
** Invoke db:test:prepare (first_time)
** Invoke environment (first_time)
2006 Jun 28
2
hash value won''t increment with =+ operator
I have a database of bookmarks and tags, and want to count the number
of bookmarks each tag is assigned to, for example: user "tyler" has
the tag "concerts" on 15 out of his 30 bookmarks. This code:
hash = Hash.new("0"); @user.tags.each do |t|
@user.bookmarks.each do |b|
x = 0
if b.tags.include?(t) then
hash[b.id] =+ 1
puts "hash is #{hash}
2010 Apr 20
1
dashboard: rake install fails (Solaris10)
Hi all,
I am trying to install dashboard 1.0.0rc1. Independantly if have
manually installed authlogic - gem or not it is throwing the following
trace. The problem is the same when I am resetting (rake db:reset) or
dropping the database.
any ideas?
best regards
Lutz
bash-3.00# rake install
(in /opt/puppet-dashboard)
dashboard_development already exists
can''t activate authlogic (=
2006 Jun 13
11
Question: Migration - multiple creates
I want to create a migration file that creates multiple tables, so i''m
guessing the correct format would be:
Can anyone confirm ? I''m guessing that each new create script requires a
seperate class so formatted this way. Perhaps I''m wrong.
TIA
Stuart
class CreateTable1 < ActiveRecord::Migration
def self.up
create_table :table1s do |t|
t.column :length,
2006 Jan 19
3
problems with migrations in sql server
Is anyone using migrations with a SQL Server database who might be able to
lend me a hand? I''ve used migrations with MySql in the past and haven''t
run into any issues so forgive When I run rake migrate nothing is actually
getting updated in my database. I created a migration using
./script/generate migration AddFooTable and updated the migration to look as
follows:
class
2006 Jun 24
2
error log for views?
This may be a bonehead question, but when I have some error in a view
I''m testing, the server spits out a generic page:
"Application error
Change this error message for exceptions thrown outside of an action
(like in Dispatcher setups or broken Ruby code) in public/500.html"
This is pretty unhelpful when I''m debugging. Is there an error log
for Rails overall
2007 Aug 07
4
Execute additional commands after creating database?
I''m writing some code that accesses some lagacy database on
PostgreSQL. Since the old database had some really ughly and weird
naming conventions (like CamelCase). To work around this I created a
second schema (named rails) in the same database and gave the tables
and fields some rails-friendly names. The database user that Rails
uses has its search_path set to the rails schema. That way
2006 Feb 22
1
Include Exclude .. a canonical way
I'm wrestling with include/exclude rules and not finding a way to do
this:
Simplified command: rsync -avv --exclcude-from=rsync_exclude \
~/ /dest/
Backup ~/ including ~/.kde3.5/share/apps/konqueror/bookmarks.xml
but excluding everything else under ~/.kde3.5
Here are some of what hasn't worked in an EXCLUDE file.
+ /.kde3.5/share/apps/konqueror/bookmarks.xml
2005 Dec 17
3
Question on Db Table design
Hi
Suppose one has a db to track bookmarks for multiple users.
Let''s assume that there are ten''s of thousands of users, and that
an average user may have 100 bookmarks. (Assume here that no
two bookmarks are the same.)
Is it a common practice to have a bookmark table for ALL users, thereby
producing a table that has on order one million rows.
Or, is it better to somehow group
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
2007 Mar 21
2
ORA-03106: fatal two-task communication protocol error
Has anyone encountered this error or know how to correct it?
I couldn''t find any Rails-specific info about this on google.
Here are the circumstances:
/usr/local/bin/ruby --version
ruby 1.8.4 (2005-12-24) [i686-linux]
/usr/local/bin/rails --version
Rails 1.1.6
## Create mcd app
rails mcd -d oracle
cd mcd
## Create oracle tablespace & user
sqlplus ''/ as
2003 Dec 18
1
sharing bookmarks with rsync
I would like to have my computer at home and my
computer at work to share the same bookmarks. My idea
was to have each of the computers sync with a server's
bookmark file. If the client has a newer file than the
server it would upload it, if the client has an older
file it would download it. I already have the
authentication keys set up and want to do it over ssh.
Would this be one way to
2004 Nov 09
1
Improper link handling?
Samba supports links now, right? I was recently experimenting with a
setup for cross-platform access to a user's FireFox bookmarks.
Unfortunately, FireFox overwrites the link to the bookmarks file on
exit. How is this possible if Samba is interpreting the link correctly?
Shouldn't the file that the bookmarks link points to be overwritten
instead? Both the link and the file are on
2006 Oct 17
3
rake -T is missing rake db:fixtures:dump?
Subject says it all: rake doesn''t know about db:fixtures:dump. When I
try, I get this:
Don''t know how to build task ''db:fixtures:dump''
I thought this was a standard feature that ships with rake- any idea
why it''s missing, and how I can reinstall it?
Here''s the environment:
Ruby version 1.8.4 (powerpc-darwin8.6.0)
RubyGems
2010 Aug 23
1
Cannot migrate database, strange error!
Im using restful authentication, and i changed the username model from
login to username. The error is Mysql::Error: Key column ''login'' doesn''t
exist in table: CREATE UNIQUE INDEX `index_users_on_login` Heres the
trace:
DEPRECATION WARNING: Rake tasks in
vendor/plugins/restful-authentication/tasks are deprecated. Use
lib/tasks instead. (called from
2010 Sep 01
4
NoMethodError: undefined method `force_encoding' for "Conten
Hi everyone!
Im trying to install mechanizer from
http://github.com/tenderlove/mechanize.
I`ve clone the project into /tmp folder. When I do rake inside the
folder /tmp/mechanizer it gives me this error:
mac159180:mechanize renatosis$ rake
(in /private/tmp/mechanize)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -w
-Ilib:bin:test:. -e ''require "rubygems";
2003 Aug 20
1
including file from excluded directory
I'm trying to explicitly include a file that exists under a directory
that I otherwise want excluded. Here are my command and include list:
rsync -e ssh -Cavz --delete --update \
--include-from=$HOME/.rsync.laptop . $DEST:
where $DEST contains the remote machine name and this is being run
from the top of my home directory. My include list is:
+ /.addressbook
+ /.ICAClient
+
2008 Jul 08
2
Centos 5.2 upgrade Firefox Migrating Bookmarks
OK. Now that I have already upgraded, how do I migrate my bookmarks.
:(
Should have exported them before the upgrade, I suspect....
2006 Jan 02
4
Bookmarking a page inside r-project.org
By way of review, most large Web sites allow the user to create
*bookmarks* which link to pages inside the Web site. However, here,
the pages have one of just two URL's:
http://www.r-project.org and
http://cran.r-project.org
The reason is the way HTML *frames* are used in setup of the Web site.
It would be very helpful if the Web site were revised so that many if
not most pages had