"Could not find table 'architectures'"

Hello list!

when installing foreman im getting "Could not find table
'architectures'" after running RAILS_ENV=production rake db:migrate

details[1]

Thanks!!!

[1]

foreman 0.1-3
[root@puppet foreman]# puppetd --version
0.25.4

------------///////////\\\\--------------

[root@puppet foreman]# cat /etc/puppet/puppet.conf
[main]
# Where Puppet stores dynamic and growing data.
# The default value is '/var/puppet'.
vardir = /var/lib/puppet

# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet

# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet

# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl

    reports         = store
    reportdir       = /var/www/puppetreports
    rrddir          = /var/www/html/rrd
    rrdinterval     = $runinterval
    rrdgraph        = false

[puppetd]
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion. Can be loaded in
# the separate puppet executable using the --loadclasses
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt
report = true
# Where puppetd caches the local configuration. An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig

[puppetmasterd]
storeconfigs = true
dbadapter = sqlite3
dblocation = /var/lib/puppet/storeconfigs.sqlite

------------///////////\\\\--------------

------------///////////\\\\--------------

[root@puppet foreman]# RAILS_ENV=production rake db:migrate --trace
(in /opt/foreman)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== CreateHosts: migrating ====================================================
== AddCreatedAtToAllTables: migrating ========================================
rake aborted!
An error has occurred, this and all later migrations canceled:

Could not migrate database: An error has occurred, this and all later
migrations canceled:

Could not find table 'schema_migrations'
/usr/lib/ruby/site_ruby/1.8/puppet/rails.rb:113:in migrate' ./db/migrate//20090714132448_create_hosts.rb:9:inup_without_benchmarks'
/opt/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:282:in
send' /opt/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:282:inmigrate'
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /opt/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:282:inmigrate'
(DELEGATION):2:in __send__' (__DELEGATION__):2:inmigrate'
/opt/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:486:in
migrate' /opt/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:560:incall'
/opt/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:560:in
ddl_transaction' /opt/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:intransaction'
/opt/foreman/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in
transaction' /opt/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:560:inddl_transaction'
/opt/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:485:in
migrate' /opt/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:472:ineach'
/opt/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:472:in
migrate' /opt/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:400:inup'
/opt/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:383:in
migrate' /opt/foreman/vendor/rails/railties/lib/tasks/databases.rake:116 /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:incall'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:ineach'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:ininvoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:238:in synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:ineach'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:inrun'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:inrun'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

> Hello list!
>
> when installing foreman im getting "Could not find table
> 'architectures'" after running RAILS_ENV=production rake db:migrate
>
> details[1]
>
>
see below

>
> [root@puppet foreman]# RAILS_ENV=production rake db:migrate --trace
>

its never a good idea to run things as root :wink:

> (in /opt/foreman)
> ** Invoke db:migrate (first_time)
> ** Invoke environment (first_time)
> ** Execute environment
> ** Execute db:migrate
> == CreateHosts: migrating
> ====================================================
> == AddCreatedAtToAllTables: migrating
> ========================================
> rake aborted!
> An error has occurred, this and all later migrations canceled:
>
> Could not migrate database: An error has occurred, this and all later
> migrations canceled:
>
> Could not find table 'schema_migrations'
>
did you delete this table?
I see you are using storeconfigs, hence storeconfig should have created this
table in your database.

if there is nothing important in your storeconfig setup (beside data which
is auto generated by puppet) I would recreate it, or use another database
with foreman (as it doesnt require storeconfig to function).

cheers,
Ohad

··· On Thu, Mar 4, 2010 at 10:16 PM, Nicolas Arias wrote:

had deleted the puppet database and same luck:

** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== CreateHosts: migrating ====================================================
– add_column(:hosts, :mac, :string, {:limit=>17, :default=>""})
-> 0.0006s
– add_column(:hosts, :sp_mac, :string, {:limit=>17, :default=>""})
-> 0.0005s
– add_column(:hosts, :sp_ip, :string, {:limit=>15, :default=>""})
-> 0.0005s
– add_column(:hosts, :sp_name, :string, {:default=>""})
-> 0.0005s
– add_column(:hosts, :root_pass, :string, {:limit=>64})
-> 0.0005s
– add_column(:hosts, :serial, :string, {:limit=>12})
-> 0.0005s
– add_column(:hosts, :puppetmaster, :string)
-> 0.0005s
– add_column(:hosts, :puppet_status, :integer, {:default=>0, :null=>false})
-> 0.0045s
– add_column(:hosts, :domain_id, :integer)
-> 0.0005s
– add_column(:hosts, :architecture_id, :integer)
-> 0.0005s
– add_column(:hosts, :operatingsystem_id, :integer)
-> 0.0004s
– add_column(:hosts, :environment_id, :integer)
-> 0.0005s
– add_column(:hosts, :subnet_id, :integer)
-> 0.0005s
– add_column(:hosts, :sp_subnet_id, :integer)
-> 0.0004s
– add_column(:hosts, :ptable_id, :integer)
-> 0.0004s
– add_column(:hosts, :media_id, :integer)
-> 0.0005s
– add_column(:hosts, :build, :boolean, {:default=>true})
-> 0.0005s
– add_column(:hosts, :comment, :text)
-> 0.0005s
– add_column(:hosts, :disk, :text)
-> 0.0005s
– add_column(:hosts, :installed_at, :datetime)
-> 0.0005s
== CreateHosts: migrated (0.0176s) ===========================================

== AddAuditsTable: migrating =================================================
– create_table(:audits, {:force=>true})
-> 0.0028s
– add_index(:audits, [:auditable_id, :auditable_type],
{:name=>"auditable_index"})
-> 0.0003s
– add_index(:audits, [:user_id, :user_type], {:name=>"user_index"})
-> 0.0003s
– add_index(:audits, :created_at)
-> 0.0003s
== AddAuditsTable: migrated (0.0042s) ========================================

== CreateArchitectures: migrating ============================================
– create_table(:architectures)
-> 0.0010s
– create_table(:architectures_operatingsystems, {:id=>false})
-> 0.0007s
rake aborted!
An error has occurred, this and all later migrations canceled:

Could not find table 'architectures'

i will try to take a look at the databse.

··· On Thu, Mar 4, 2010 at 11:25 AM, Ohad Levy wrote: > > On Thu, Mar 4, 2010 at 10:16 PM, Nicolas Arias wrote: >> >> Hello list! >> >> when installing foreman im getting "Could not find table >> 'architectures'" after running RAILS_ENV=production rake db:migrate >> >> details[1] >> > > see below >> >> [root@puppet foreman]# RAILS_ENV=production rake db:migrate --trace > > its never a good idea to run things as root ;) >> >> (in /opt/foreman) >> ** Invoke db:migrate (first_time) >> ** Invoke environment (first_time) >> ** Execute environment >> ** Execute db:migrate >> == CreateHosts: migrating >> ==================================================== >> == AddCreatedAtToAllTables: migrating >> ======================================== >> rake aborted! >> An error has occurred, this and all later migrations canceled: >> >> Could not migrate database: An error has occurred, this and all later >> migrations canceled: >> >> Could not find table 'schema_migrations' > > did you delete this table? > I see you are using storeconfigs, hence storeconfig should have created this > table in your database. > if there is nothing important in your storeconfig setup (beside data which > is auto generated by puppet) I would recreate it, or use another database > with foreman (as it doesnt require storeconfig to function). > cheers, > Ohad > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To post to this group, send email to foreman-users@googlegroups.com. > To unsubscribe from this group, send email to > foreman-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/foreman-users?hl=en. >

since someone hit it again today, just for prosperity, this is cause
because of having the wrong sqlite gem installed.
only the rubygem version should be installed.

Ohad

··· On Thu, Mar 4, 2010 at 4:44 PM, Nicolas Arias wrote: > had deleted the puppet database and same luck: > > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > ** Execute db:migrate > == CreateHosts: migrating ==================================================== > -- add_column(:hosts, :mac, :string, {:limit=>17, :default=>""}) > -> 0.0006s > -- add_column(:hosts, :sp_mac, :string, {:limit=>17, :default=>""}) > -> 0.0005s > -- add_column(:hosts, :sp_ip, :string, {:limit=>15, :default=>""}) > -> 0.0005s > -- add_column(:hosts, :sp_name, :string, {:default=>""}) > -> 0.0005s > -- add_column(:hosts, :root_pass, :string, {:limit=>64}) > -> 0.0005s > -- add_column(:hosts, :serial, :string, {:limit=>12}) > -> 0.0005s > -- add_column(:hosts, :puppetmaster, :string) > -> 0.0005s > -- add_column(:hosts, :puppet_status, :integer, {:default=>0, :null=>false}) > -> 0.0045s > -- add_column(:hosts, :domain_id, :integer) > -> 0.0005s > -- add_column(:hosts, :architecture_id, :integer) > -> 0.0005s > -- add_column(:hosts, :operatingsystem_id, :integer) > -> 0.0004s > -- add_column(:hosts, :environment_id, :integer) > -> 0.0005s > -- add_column(:hosts, :subnet_id, :integer) > -> 0.0005s > -- add_column(:hosts, :sp_subnet_id, :integer) > -> 0.0004s > -- add_column(:hosts, :ptable_id, :integer) > -> 0.0004s > -- add_column(:hosts, :media_id, :integer) > -> 0.0005s > -- add_column(:hosts, :build, :boolean, {:default=>true}) > -> 0.0005s > -- add_column(:hosts, :comment, :text) > -> 0.0005s > -- add_column(:hosts, :disk, :text) > -> 0.0005s > -- add_column(:hosts, :installed_at, :datetime) > -> 0.0005s > == CreateHosts: migrated (0.0176s) =========================================== > > == AddAuditsTable: migrating ================================================= > -- create_table(:audits, {:force=>true}) > -> 0.0028s > -- add_index(:audits, [:auditable_id, :auditable_type], > {:name=>"auditable_index"}) > -> 0.0003s > -- add_index(:audits, [:user_id, :user_type], {:name=>"user_index"}) > -> 0.0003s > -- add_index(:audits, :created_at) > -> 0.0003s > == AddAuditsTable: migrated (0.0042s) ======================================== > > == CreateArchitectures: migrating ============================================ > -- create_table(:architectures) > -> 0.0010s > -- create_table(:architectures_operatingsystems, {:id=>false}) > -> 0.0007s > rake aborted! > An error has occurred, this and all later migrations canceled: > > Could not find table 'architectures' > > > > i will try to take a look at the databse. > > On Thu, Mar 4, 2010 at 11:25 AM, Ohad Levy wrote: >> >> On Thu, Mar 4, 2010 at 10:16 PM, Nicolas Arias wrote: >>> >>> Hello list! >>> >>> when installing foreman im getting "Could not find table >>> 'architectures'" after running RAILS_ENV=production rake db:migrate >>> >>> details[1] >>> >> >> see below >>> >>> [root@puppet foreman]# RAILS_ENV=production rake db:migrate --trace >> >> its never a good idea to run things as root ;) >>> >>> (in /opt/foreman) >>> ** Invoke db:migrate (first_time) >>> ** Invoke environment (first_time) >>> ** Execute environment >>> ** Execute db:migrate >>> == CreateHosts: migrating >>> ==================================================== >>> == AddCreatedAtToAllTables: migrating >>> ======================================== >>> rake aborted! >>> An error has occurred, this and all later migrations canceled: >>> >>> Could not migrate database: An error has occurred, this and all later >>> migrations canceled: >>> >>> Could not find table 'schema_migrations' >> >> did you delete this table? >> I see you are using storeconfigs, hence storeconfig should have created this >> table in your database. >> if there is nothing important in your storeconfig setup (beside data which >> is auto generated by puppet) I would recreate it, or use another database >> with foreman (as it doesnt require storeconfig to function). >> cheers, >> Ohad >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To post to this group, send email to foreman-users@googlegroups.com. >> To unsubscribe from this group, send email to >> foreman-users+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/foreman-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To post to this group, send email to foreman-users@googlegroups.com. > To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en. > >