Hi All,
I’m a complete newby to ruby, installed all the latest versions, etc.
Using
latest mySQL.
Running rake production db:bootstrap doesn’t work for me. See output
below.
For some reason it doesn’t seem to go past migrating beyond version 3.
And
therefor all else fails.
For those who read this and encountered the same issue: I found a
workaround
by copying the database.yml file from my new project into the config
directory of the radiant gem, and then run:
C:\ruby\lib\ruby\gems\1.8\gems\radiant-0.6.2>rake production
db_schema_import
And then adding a user ‘admin’ in the database table users (with
password
ba3043ba889540e17d38da8532f4f84eb0d53843 which is the hash for
‘radiant’)
However, I’d rather like to know why it didn’t install correctly
according
to the instructions in the INSTALL file and the website. Any help is
appreciated.
Regards,
Jimmy
C:\temp\rails\myweb>rake production db:bootstrap
(in C:/temp/rails/myweb)
Extensions cannot be used until Radiant migrations are up to date.
This task will destroy any data in the database. Are you sure you want
to
continue? [yn] y
== CreateRadiantTables: migrating
– create_table(“config”, {:force=>true})
-> 0.1310s
– add_index(“config”, [“key”], {:unique=>true, :name=>“key”})
-> 0.5300s
– create_table(“pages”, {:force=>true})
-> 0.1300s
– create_table(“page_parts”, {:force=>true})
-> 0.1210s
– create_table(“snippets”, {:force=>true})
-> 0.1400s
– add_index(“snippets”, [“name”], {:unique=>true, :name=>“name”})
-> 0.4610s
– create_table(“layouts”, {:force=>true})
-> 0.1400s
– create_table(“users”, {:force=>true})
-> 0.2100s
– add_index(“users”, [“login”], {:unique=>true, :name=>“login”})
-> 0.6410s
== CreateRadiantTables: migrated (2.5040s)
== InsertInitialData: migrating
== InsertInitialData: migrated (0.0000s)
== RenameBehaviorColumn: migrating
– rename_column(:pages, :behavior, :behavior_id)
-> 0.2910s
== RenameBehaviorColumn: migrated (0.2910s)
Create the admin user (press enter for defaults).
Name (Administrator):
Username (admin):
Password (radiant):
Initializing configuration…OK
Select a database template:
- Empty
- Simple Blog
- Styled Blog
[1-3]: 2
Creating Snippets…FAILED
rake aborted!
undefined method `filter_id’ for #Snippet:0x473009c
(See full trace by running task with --trace)
C:\temp\rails\myweb>
Hard to tell much from that, can you run the rake task again with “–
trace” on it to get a full output?
Hard to tell much from that, can you run the rake task again with “–
trace” on it to get a full output?
See below.
It doesn’t seem to provide much more useful info… the reason rake
aborts is
because the column filter_id doesn’t exist, which indeed is the case
when
only the first 3 migration scripts are run.
Question: it is normal that the migration scripts are run, instead of
just
simply the latest schema.rb ?
Regards,
Jimmy
C:\temp\rails\myweb>rake --trace development db:bootstrap
(in C:/temp/rails/myweb)
** Invoke development (first_time)
** Execute development
** Invoke environment (first_time)
** Execute environment
Extensions cannot be used until Radiant migrations are up to date.
** Invoke db:bootstrap (first_time)
** Invoke db:remigrate (first_time)
** Invoke environment
** 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.1300s
– add_index(“config”, [“key”], {:unique=>true, :name=>“key”})
-> 0.7310s
– create_table(“pages”, {:force=>true})
-> 0.1400s
– create_table(“page_parts”, {:force=>true})
-> 0.1300s
– create_table(“snippets”, {:force=>true})
-> 0.2310s
– add_index(“snippets”, [“name”], {:unique=>true, :name=>“name”})
-> 0.8710s
– create_table(“layouts”, {:force=>true})
-> 0.2900s
– create_table(“users”, {:force=>true})
-> 0.1300s
– add_index(“users”, [“login”], {:unique=>true, :name=>“login”})
-> 0.4210s
== CreateRadiantTables: migrated (3.0940s)
== InsertInitialData: migrating
== InsertInitialData: migrated (0.0000s)
== RenameBehaviorColumn: migrating
– rename_column(:pages, :behavior, :behavior_id)
-> 0.7910s
== RenameBehaviorColumn: migrated (0.7910s)
** Invoke db:schema:dump
** Invoke db:schema:dump
** Execute db:bootstrap
Create the admin user (press enter for defaults).
Name (Administrator):
Username (admin):
Password (radiant):
Initializing configuration…OK
Select a database template:
- Empty
- Simple Blog
- Styled Blog
[1-3]: 2
Creating Snippets…FAILED
rake aborted!
undefined method filter_id' for #<Snippet:0x4724738> c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2 /vendor/rails/activerecord/lib/active_re cord/base.rb:1860:in
method_missing’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2
/vendor/rails/activerecord/lib/active_re
cord/validations.rb:300:in send' c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2 /vendor/rails/activerecord/lib/active_re cord/validations.rb:300:in
validates_each’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2
/vendor/rails/activerecord/lib/active_re
cord/validations.rb:299:in each' c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2 /vendor/rails/activerecord/lib/active_re cord/validations.rb:299:in
validates_each’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2
/vendor/rails/activerecord/lib/active_re
cord/validations.rb:822:in call' c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2 /vendor/rails/activerecord/lib/active_re cord/validations.rb:822:in
run_validations’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2
/vendor/rails/activerecord/lib/active_re
cord/validations.rb:816:in each' c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2 /vendor/rails/activerecord/lib/active_re cord/validations.rb:816:in
run_validations’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2
/vendor/rails/activerecord/lib/active_re
cord/validations.rb:780:in valid_without_callbacks?' c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2 /vendor/rails/activerecord/lib/active_re cord/callbacks.rb:299:in
valid?’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2
/vendor/rails/activerecord/lib/active_re
cord/validations.rb:751:in save_without_transactions' c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2 /vendor/rails/activerecord/lib/active_re cord/transactions.rb:129:in
save’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2
/vendor/rails/activerecord/lib/active_re
cord/connection_adapters/abstract/database_statements.rb:59:in
transaction' c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2 /vendor/rails/activerecord/lib/active_re cord/transactions.rb:95:in
transaction’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2
/vendor/rails/activerecord/lib/active_re
cord/transactions.rb:121:in transaction' c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2 /vendor/rails/activerecord/lib/active_re cord/transactions.rb:129:in
save’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2/lib/radiant/setup.rb:144:in
create_rec ords' c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2/lib/radiant/setup.rb:143:in
each’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2/lib/radiant/setup.rb:143:in
create_rec ords' c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2/lib/radiant/setup.rb:204:in
step’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2/lib/radiant/setup.rb:142:in
create_rec ords' c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2/lib/radiant/setup.rb:191:in
feedback’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2/lib/radiant/setup.rb:138:in
create_rec ords' c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2/lib/radiant/setup.rb:137:in
each’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2/lib/radiant/setup.rb:137:in
create_rec ords' c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2/lib/radiant/setup.rb:75:in
load_databa
se_template’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2/lib/radiant/setup.rb:22:in
bootstrap' c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2/lib/radiant/setup.rb:10:in
bootstrap’
c:/ruby/lib/ruby/gems/1.8/gems/radiant-0.6.2/lib/tasks/database.rake:25
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in call' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in
execute’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in
execute’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:369:in invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in
synchronize’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in
run’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in
run’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/bin/rake:7
c:/ruby/bin/rake.bat:20:in `load’
c:/ruby/bin/rake.bat:20
C:\temp\rails\myweb>
What database are you using?
Sean