Db:bootstrap issue continued

I’m having problems with the db:bootstrap again. For some reason,
whenever i
bootstrap, migrate, remigrate or import, the db first gets migrated to
latest version (15), then i’m asked to confirm again, and the db is
reverted
back to version 0. after that it naturally fails when trying to run the
setup and create users…

I’m on radiant edge, i re-created the db trough mysqladmin, to no avail.
I’m aware that i’m not in production environment, but that shouldn’t be
an
issue.

Here’s a trace of db:bootstrap;

MBPjomz:~/rails/gemified bennydegezelle$ rake db:bootstrap --trace
(in /Users/bennydegezelle/rails/gemified)
** Invoke db:bootstrap (first_time)
** Invoke db:remigrate (first_time)
** Invoke environment (first_time)
** Execute environment
Extensions cannot be used until Radiant migrations are up to date.
** Execute db:remigrate
This task will destroy any data in the database. Are you sure you want
to
continue? [yn] y
** Invoke db:migrate (first_time)
** Invoke environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
== CreateRadiantTables: migrating

– create_table(“config”, {:force=>true})
-> 0.0033s
– add_index(“config”, [“key”], {:name=>“key”, :unique=>true})
-> 0.4381s
– create_table(“pages”, {:force=>true})
-> 0.0329s
– create_table(“page_parts”, {:force=>true})
-> 0.0035s
– create_table(“snippets”, {:force=>true})
-> 0.0037s
– add_index(“snippets”, [“name”], {:name=>“name”, :unique=>true})
-> 0.0069s
– create_table(“layouts”, {:force=>true})
-> 0.0035s
– create_table(“users”, {:force=>true})
-> 0.0041s
– add_index(“users”, [“login”], {:name=>“login”, :unique=>true})
-> 0.0064s
== CreateRadiantTables: migrated (0.5037s)

== InsertInitialData: migrating

== InsertInitialData: migrated (0.0000s)

== RenameBehaviorColumn: migrating

– rename_column(:pages, :behavior, :behavior_id)
-> 0.0210s
== RenameBehaviorColumn: migrated (0.0211s)

== RenameFilterColumn: migrating

– rename_column(:page_parts, :filter, :filter_id)
-> 0.0077s
– rename_column(:snippets, :filter, :filter_id)
-> 0.0086s
== RenameFilterColumn: migrated (0.0166s)

== AddVirtualColumnToPage: migrating

– add_column(“pages”, “virtual”, :boolean, {:null=>false,
:default=>false})
-> 0.0177s
== AddVirtualColumnToPage: migrated (0.0180s)

== IntegerColumnsToBoolean: migrating

== IntegerColumnsToBoolean: saving User data

– remove_column(“users”, “admin”)
-> 0.0056s
– add_column(“users”, “admin”, :boolean, {:null=>false,
:default=>false})
-> 0.0055s
== IntegerColumnsToBoolean: restoring User data

== IntegerColumnsToBoolean: saving User data

– remove_column(“users”, “developer”)
-> 0.0181s
– add_column(“users”, “developer”, :boolean, {:null=>false,
:default=>false})
-> 0.0066s
== IntegerColumnsToBoolean: restoring User data

== IntegerColumnsToBoolean: migrated (0.0396s)

== RemoveVirtualColumnFromPage: migrating

– remove_column(“pages”, “virtual”)
-> 0.0744s
== RemoveVirtualColumnFromPage: migrated (0.0747s)

== AddVirtualColumnToPageAgain: migrating

– add_column(“pages”, “virtual”, :boolean, {:null=>false,
:default=>false})
-> 0.0060s
== AddVirtualColumnToPageAgain: migrated (0.0061s)

== AddContentTypeFieldToLayout: migrating

– add_column(“layouts”, “content_type”, :string, {:limit=>40})
-> 0.0061s
== AddContentTypeFieldToLayout: migrated (0.0062s)

== MergeBehaviorsAndPages: migrating

== MergeBehaviorsAndPages: converting behavior names to class names

– rename_column(:pages, :behavior_id, :type)
-> 0.0088s
== MergeBehaviorsAndPages: migrated (0.0110s)

== RenameTypeColumnOnPageToClassName: migrating

– rename_column(“pages”, “type”, “class_name”)
-> 0.0089s
== RenameTypeColumnOnPageToClassName: migrated (0.0092s)

== CreateExtensionMeta: migrating

– create_table(“extension_meta”, {:force=>true})
-> 0.0033s
== CreateExtensionMeta: migrated (0.0034s)

== AddNotesFieldToUser: migrating

– add_column(“users”, “notes”, :text)
-> 0.0155s
== AddNotesFieldToUser: migrated (0.0156s)

== RenameConfigDefaultPartsKey: migrating

== RenameConfigDefaultPartsKey: migrated (0.0064s)

== AddOptimisticLocking: migrating

– add_column(:pages, :lock_version, :integer, {:default=>0})
-> 0.0074s
– add_column(:layouts, :lock_version, :integer, {:default=>0})
-> 0.0082s
– add_column(:snippets, :lock_version, :integer, {:default=>0})
-> 0.0178s
– add_column(:users, :lock_version, :integer, {:default=>0})
-> 0.0063s
== AddOptimisticLocking: migrated (0.0407s)

** Invoke db:schema:dump
** Invoke db:schema:dump
** Invoke db:schema:dump
This task will destroy any data in the database. Are you sure you want
to
continue? [yn] y
== AddOptimisticLocking: reverting

– remove_column(:pages, :lock_version)
-> 0.0687s
– remove_column(:layouts, :lock_version)
-> 0.0064s
– remove_column(:snippets, :lock_version)
-> 0.0065s
– remove_column(:users, :lock_version)
-> 0.0908s
== AddOptimisticLocking: reverted (0.1729s)

== RenameConfigDefaultPartsKey: reverting

== RenameConfigDefaultPartsKey: reverted (0.0011s)

== AddNotesFieldToUser: reverting

– remove_column(“users”, “notes”)
-> 0.0073s
== AddNotesFieldToUser: reverted (0.0075s)

== CreateExtensionMeta: reverting

– drop_table(“extension_meta”)
-> 0.0019s
== CreateExtensionMeta: reverted (0.0021s)

== RenameTypeColumnOnPageToClassName: reverting

– rename_column(“pages”, “class_name”, “type”)
-> 0.0098s
== RenameTypeColumnOnPageToClassName: reverted (0.0100s)

== MergeBehaviorsAndPages: reverting

– rename_column(:pages, :type, :behavior_id)
-> 0.0083s
== MergeBehaviorsAndPages: converting class names back to behavior names

== MergeBehaviorsAndPages: reverted (0.0115s)

== AddContentTypeFieldToLayout: reverting

– remove_column(“layouts”, “content_type”)
-> 0.0050s
== AddContentTypeFieldToLayout: reverted (0.0052s)

== AddVirtualColumnToPageAgain: reverting

– remove_column(“pages”, “virtual”)
-> 0.0063s
== AddVirtualColumnToPageAgain: reverted (0.0064s)

== RemoveVirtualColumnFromPage: reverting

– add_column(“pages”, “virtual”, :boolean, {:null=>false,
:default=>false})
-> 0.0071s
== RemoveVirtualColumnFromPage: reverted (0.0073s)

== IntegerColumnsToBoolean: reverting

== IntegerColumnsToBoolean: saving User data

– remove_column(“users”, “admin”)
-> 0.0187s
– add_column(“users”, “admin”, :integer, {:null=>false, :default=>0,
:limit=>1})
-> 0.0069s
== IntegerColumnsToBoolean: restoring User data

== IntegerColumnsToBoolean: saving User data

– remove_column(“users”, “developer”)
-> 0.0055s
– add_column(“users”, “developer”, :integer, {:null=>false,
:default=>0,
:limit=>1})
-> 0.0062s
== IntegerColumnsToBoolean: restoring User data

== IntegerColumnsToBoolean: reverted (0.0415s)

== AddVirtualColumnToPage: reverting

– remove_column(“pages”, “virtual”)
-> 0.0070s
== AddVirtualColumnToPage: reverted (0.0071s)

== RenameFilterColumn: reverting

– rename_column(:page_parts, :filter_id, :filter)
-> 0.0106s
– rename_column(:snippets, :filter_id, :filter)
-> 0.0342s
== RenameFilterColumn: reverted (0.0452s)

== RenameBehaviorColumn: reverting

– rename_column(:pages, :behavior_id, :behavior)
-> 0.0099s
== RenameBehaviorColumn: reverted (0.0101s)

== InsertInitialData: reverting

== InsertInitialData: reverted (0.0000s)

== CreateRadiantTables: reverting

– drop_table(“pages”)
-> 0.0024s
– drop_table(“page_parts”)
-> 0.0031s
– drop_table(“snippets”)
-> 0.0019s
– drop_table(“layouts”)
-> 0.0016s
– drop_table(“users”)
-> 0.0016s
– drop_table(“config”)
-> 0.0019s
== CreateRadiantTables: reverted (0.0129s)

** Invoke db:migrate
** Invoke db:schema:dump
** Execute db:bootstrap

Create the admin user (press enter for defaults).
Name (Administrator):
Username (admin):
Password (radiant):
rake aborted!
Mysql::Error: #42S02Table ‘dequeeste_development.users’ doesn’t exist:
SHOW
FIELDS FROM users
/Users/bennydegezelle/rails/gemified/config/…/vendor/radiant/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:128:in
log' /Users/bennydegezelle/rails/gemified/config/../vendor/radiant/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:243:inexecute’
/Users/bennydegezelle/rails/gemified/config/…/vendor/radiant/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:348:in
columns' /Users/bennydegezelle/rails/gemified/config/../vendor/radiant/vendor/rails/activerecord/lib/active_record/base.rb:763:incolumns’
/Users/bennydegezelle/rails/gemified/config/…/vendor/radiant/vendor/rails/activerecord/lib/active_record/base.rb:776:in
column_names' /Users/bennydegezelle/rails/gemified/config/../vendor/radiant/vendor/rails/activerecord/lib/active_record/base.rb:789:incolumn_methods_hash’
/Users/bennydegezelle/rails/gemified/config/…/vendor/radiant/vendor/rails/activerecord/lib/active_record/base.rb:1262:in
all_attributes_exists?' /usr/local/lib/ruby/1.8/erb.rb:741:inall?’
/Users/bennydegezelle/rails/gemified/config/…/vendor/radiant/vendor/rails/activerecord/lib/active_record/base.rb:1262:in
all_attributes_exists?' /Users/bennydegezelle/rails/gemified/config/../vendor/radiant/vendor/rails/activerecord/lib/active_record/base.rb:1196:inmethod_missing’
/Users/bennydegezelle/rails/gemified/config/…/vendor/radiant/lib/radiant/setup.rb:40:in
create_admin_user' /Users/bennydegezelle/rails/gemified/config/../vendor/radiant/lib/radiant/setup.rb:19:inbootstrap’
/Users/bennydegezelle/rails/gemified/config/…/vendor/radiant/lib/radiant/setup.rb:10:in
bootstrap' /Users/bennydegezelle/rails/gemified/config/../lib/tasks/database.rake:25 /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:inexecute’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in
execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:ininvoke’
/usr/local/lib/ruby/1.8/thread.rb:135:in synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:ininvoke’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in
top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:intop_level’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:intop_level’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:instandard_exception_handling’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
/usr/local/bin/rake:16
MBPjomz:~/rails/gemified bennydegezelle$

If anybody has a clue as to why it asks for confirmation twice and
revert
the migrations, i would love to hear

Met vriendelijke groeten,

Benny D.

Gorilla webdesign
www.gorilla-webdesign.be

I believe I’m having the same problem, however, mine is during radiant
instance mode install. I’m creating an empty Rails app, then running
the radiant command on the new project dir, then running bootstrap, then
getting the ‘users table does not exist’ error immediately after setting
the admin username/pwd.

Any suggestions?

-Luke

Unless you intend to hack Radiant into your Rails app (refer to the work
Matt and Loren have been doing lately), don’t use the ‘rails’ command at
all. Just the ‘radiant’ command will do. It’s very possible that it’s
not correctly running the migrations because the boot/environment files
are not being overwritten.

Sean

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs