(changed subject to make more relevant)

Ok, thanks Mamed.

I was wondering though if this is a bug in the Rakefile or somewhere else? I'd be willing to try and fix it and submit the patch/update as necessary (perhaps a good way to learn more about migrations and git etc!).

Any clues?

Jonathan.


On 29 Jul 2009, at 18:42, Mamed Mamedov wrote:

Hi!

It was the same problem with *reorder* extension, after installation success the migration task does nothing, therefore the /admin/pages page gives HTTP
500 error.
That is what I have done to make reorder extension complete it's
installation process:

selene# cat vendor/extensions/reorder/db/migrate/ 01_add_position_to_pages.rb
class AddPositionToPages < ActiveRecord::Migration
 def self.up
   add_column :pages, :position, :integer
   Page.reset_column_information
   say_with_time("Putting all pages in a default order...") do
     ActiveRecord::Base.record_timestamps = false
     Page.find_all_by_parent_id(nil).each do |p|
       put_children_into_list(p)
     end
     ActiveRecord::Base.record_timestamps = true
   end
 end

 def self.down
   remove_column :pages, :position
 end

 def self.put_children_into_list(page)
page.children.find(:all, :order => "title asc").each_with_index do |pg,
idx|
     pg.update_attribute('position', idx + 1)
     put_children_into_list(pg)
   end
 end
end

Then, run these:
selene# ./script/console
Loading development environment (Rails 2.1.2)


And copy the contents of file shown before to console and press Enter.
Finally, type this: AddPositionToPages.up(); and then press Enter :) Voila!

Hope this will help you!
________________
Regards,
Mamed Mamedov


Samuel Goldwyn<http://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html >
- "I'm willing to admit that I may not always be right, but I am never
wrong."

2009/7/29 Jonathan Batchelor <j...@atuin.co.uk>

Thanks - seems to be working fine now!

I am however having issues with the reorder plugin.
When I install it, it fails to insert the "position" field into the pages
table. Possibly because I have no pages in my site yet (I want to use
import_export to grab them from a development install I have elsewhere) - has anyone else seen this issue? I think the migration assumes that there will be a page with no parent - but being fairly new to rails, I'm not sure if that means the migration gets rolled back in the install or not... Then
again, I don't see the "say_with_time("Putting all pages in a default
order...") bit printed out either - perhaps it goes to a log somewhere
instead.

Thanks for all your help!

Jonathan.



On 28 Jul 2009, at 19:35, john muhl wrote:

i've just fixed this, update ray and you shouldn't run into that anymore.

On Tue, Jul 28, 2009 at 5:25 AM, Jonathan Batchelor<j...@atuin.co.uk>
wrote:

I've been playing about with Radiant for a few days now and am really
liking it's simplicity and flexibility.

After installing on my MacBook and beginning some developmet I want to install on my Dreamhost account. I have been migrated to a newer server
by
Dreamhost and have Radiant 0.8.0 working now.

I started to install install extensions and took the advice on the wiki page to use ray as it will automatically reload Passenger for me. However although the script/extensions install command works fine, as did setting the config for ray using rake ray:setup:restart server=passenger, when I
come to install an extension it does not work. I have included the
--trace
output below - can anyone help?

Thanks,
Jonathan.

$ rake production ray:extension:install name=dashboard --trace
(in /home/xxxx/xxxx_radiant)
** Invoke production (first_time)
** Execute production
** Invoke environment (first_time)
** Execute environment
** Invoke ray:extension:install (first_time)
** Execute ray:extension:install
rake aborted!
undefined method `strip' for nil:NilClass

/home/xxxx/xxxx_radiant/vendor/extensions/ray/lib/tasks/ ray_extension_tasks.rake:807:in
`get_download_preference'

/home/xxxx/xxxx_radiant/vendor/extensions/ray/lib/tasks/ ray_extension_tasks.rake:151:in
`install_extension'

/home/xxxx/xxxx_radiant/vendor/extensions/ray/lib/tasks/ ray_extension_tasks.rake:20
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/home/xxxx/.gems/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/home/xxxx/.gems/gems/rake-0.8.7/bin/rake:31
/home/xxxx/.gems/bin/rake:19:in `load'
/home/xxxx/.gems/bin/rake:19
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to