[Radiant] rack 1.0.1 and rack 1.1.0 problem with radiant-0.9.0.rc2 and rails 2.3.8
Hello, I'm trying to install radiant cms version 0.9.0 rc2 in ubuntu with passenger and rails 2.3.8 and I'm having the following error: can't activate rack (~ 1.0.1, runtime) for [], already activated rack-1.1.0 for [radiant-0.9.0.rc2]. I have rack 1.0.1 and rack 1.1.0 installed in my system. How can I overcame this problem? uninstalling rack 1.1.0 is not an option since my other rails applications stop to work. Regards, Paulo Abreu - my gem list: *** LOCAL GEMS *** actionmailer (2.3.8) actionpack (2.3.8) activerecord (2.3.8) activeresource (2.3.8) activesupport (2.3.8) authlogic (2.1.6) bundler (0.9.26) rack (1.1.0, 1.0.1) radiant (0.9.0.rc2) rails (2.3.8) rake (0.8.7) RedCloth (4.2.3) sqlite3-ruby (1.3.1) will_paginate (2.3.14)
[Radiant] page with image?
Hi, My pages are filled with content off houses/appartments. We have 1 image for the homepage and 9 for the landingpage. What is best way to realize it? remco
Re: [Radiant] rack 1.0.1 and rack 1.1.0 problem with radiant-0.9.0.rc2 and rails 2.3.8
Paulo Abreu, Editing the gemspec worked for me your ruby installation/gems/1.8/specifications/radiant-0.8.2.gemspec s.add_runtime_dependency(%qrack, [= 1.0.0, 1.2.1]) But with pre-0.9, you can fix the radiant gem spec: your ruby installation/gems/1.8/specifications/radiant-0.8.2.gemspec Change the line: s.add_runtime_dependency(%qrack, [= 1.0.0]) to: s.add_runtime_dependency(%qrack, [= 1.0.0, 1.1.0]) Or, You may can edit : (note I received from : Jeff Casimir) /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/radiant-0.8.2/vendor/rails/actionpack/lib/action_controller.rb change the gem rack line to 1.1.0. Changing the gemspec should just change the install-time dependencies, not the load time requirements -- unless I'm mistaken. This change to action controller affects the loadtime. On Aug 11, 2010, at 12:06 PM, Paulo Abreu wrote: Hello, I'm trying to install radiant cms version 0.9.0 rc2 in ubuntu with passenger and rails 2.3.8 and I'm having the following error: can't activate rack (~ 1.0.1, runtime) for [], already activated rack-1.1.0 for [radiant-0.9.0.rc2]. I have rack 1.0.1 and rack 1.1.0 installed in my system. How can I overcame this problem? uninstalling rack 1.1.0 is not an option since my other rails applications stop to work. Regards, Paulo Abreu - my gem list: *** LOCAL GEMS *** actionmailer (2.3.8) actionpack (2.3.8) activerecord (2.3.8) activeresource (2.3.8) activesupport (2.3.8) authlogic (2.1.6) bundler (0.9.26) rack (1.1.0, 1.0.1) radiant (0.9.0.rc2) rails (2.3.8) rake (0.8.7) RedCloth (4.2.3) sqlite3-ruby (1.3.1) will_paginate (2.3.14)
[Radiant] Additional layers of tabs in admin interface
All, Can I generate another level of tabs in the admin interface, so that I have one tab at the top level and then when I click it, I see several sub-tabs, and under each of those I see various buttons? Thanks, Wes
Re: [Radiant] TinyMCE _images_sizes.html.haml
On Aug 11, 2010, at 2:30 PM, Jim Gay wrote: On Wed, Aug 11, 2010 at 2:43 PM, Steven Southard ste...@stevensouthard.com wrote: Is this caused by migrating paperclipped before settings? I read something about that but why does that cause a problem? Is there a good way to fix the issue if it really is an issue? Cheers, Steven On Aug 10, 2010, at 11:51 AM, Steven Southard wrote: I have the same thing now. Did you ever get an answer? Cheers, Steven See this http://saturnflyer.com/blog/jim/2010/06/29/ruby-metaprogramming-is-awesome/ That's only a short-term solution. As for you TinyMCE error, I don't know. I haven't used it. 2) Upon trying to browse for an image when clicking the insert image button using the TinyMCE wysiwyg editor I get the following error: -- Showing vendor/extensions/tiny_paper/app/views/admin/tiny_paper/ _images_sizes.html.haml where line #6 raised: undefined method `each' for #Proc:0x1032757f0 Extracted source (around line #6): 3: %p= asset.title 4: %div 5: %table#sizes 6: - @thumbnails.each do |k, v| 7: %tr 8: %th= link_to k, asset.asset.url(k) 9: %td= asset.width(k).to_s + 'px x ' + asset.height(k).to_s + 'px' -- Has anyone else encountered this problem or have any idea/clue as how to fix it. Any help is appreciated. Kind Regards Rich -- Jim Gay Saturn Flyer LLC http://www.saturnflyer.com 571-403-0338 This is the first time I've used it and so far I could say it is kind of what I've been avoiding. I really believe if people gave textile a chance for a week they would get it. This seems hard to use properly, but my client thinks it looks great if only the photo thing would work. http://github.com/Aissac/radiant-tiny-paper-extension/issues/issue/1 I really like this: archercom May 19, 2010 | link nevermind, I had to make sure the settings extension was raked before paperclipped cristi May 25, 2010 | link fixed and closed Is this really true? Does setting need to be raked first? Is this something I should change in environment.rb. Cheers, Steven
[Radiant] create new page on heroku
With 9.1 on Heroku I am having a problem saving new pages. It saves pages I made on my localhost just won't make a new one. I get this: ActiveRecord::StatementInvalid (PGError: ERROR: invalid input syntax for integer: : SELECT * FROM page_parts WHERE (page_parts.id IN ('','')) AND (page_parts.page_id = NULL) ORDER BY id): /home/slugs/258179_58f1601_b92e/mnt/.gems/gems/will_paginate-2.3.14/ lib/will_paginate/finder.rb:170:in `method_missing' radiant (0.9.1) app/controllers/admin/resource_controller.rb:64:in `create' Is there a problem with page_parts or will_paginate-2.3.14? Any ideas? Cheers, Steven
[Radiant] Customizing the user admin UI at the column level
I have reviewed the contents of http://wiki.github.com/radiant/radiant/modifying-the-page-ui in depth. I have extension that modifies the user model to be attached to something called a program, and I've made the change in the DB, and modified the user model in my extension code like so: User class User ActiveRecord::Base belongs_to :program end so that the association will be there. Now, I would like to be able to display and edit program assignments for a given user in the admin. UI. In my extension's activate method, I added the following lines in the hopes of customizing the UI: admin.user.edit.form 'edit_program' admin.user.index.thead 'program_header' admin.user.index.tbody 'program_cell' thinking that the display of the user admin was super dynamic and it would just figure out how to display the edit components based on attribute type. But when I try to look at the index view of users, I get: `program_header' default partial not found! `program_cell' default partial not found! as errors in the index display. and `edit_program' default partial not found! as an error in the edit display. ** After looking into it, though, I see the admin/users/edit and admin/users/index views under the Radiant core are more or less hard-coded at the column level, but the error messages imply that I should be able to add a partial somewhere for my custom fields. Questions: What is the preferred way to customize at this level? Do I need to just override the entire edit and index views? Is there some Javascript-y way to do this that I'm missing? Many thanks, Wes
Re: [Radiant] Customizing the user admin UI at the column level
On 13 Aug 2010, at 00:35, Wes Gamble wrote: I have reviewed the contents of http://wiki.github.com/radiant/radiant/modifying-the-page-ui in depth. I have extension that modifies the user model to be attached to something called a program, and I've made the change in the DB, and modified the user model in my extension code like so: User class User ActiveRecord::Base belongs_to :program end so that the association will be there. Now, I would like to be able to display and edit program assignments for a given user in the admin. UI. In my extension's activate method, I added the following lines in the hopes of customizing the UI: admin.user.edit.form 'edit_program' admin.user.index.thead 'program_header' admin.user.index.tbody 'program_cell' thinking that the display of the user admin was super dynamic and it would just figure out how to display the edit components based on attribute type. But when I try to look at the index view of users, I get: `program_header' default partial not found! `program_cell' default partial not found! as errors in the index display. and `edit_program' default partial not found! as an error in the edit display. After looking into it, though, I see the admin/users/edit and admin/users/index views under the Radiant core are more or less hard-coded at the column level, but the error messages imply that I should be able to add a partial somewhere for my custom fields. Questions: What is the preferred way to customize at this level? You're on the right lines, though I would normally use this kind of idiom to get more control: admin.users.edit.add :form, edit_program, :after = something and then you need to create the partial, which in this case would be vendor/extensions/your_extension/app/views/admin/users/_edit_program.html.haml If you want it to live somewhere else - eg. to share a form component between several models - then you can specify the full path to the partial in the usual way: admin.users.edit.add :form, admin/programs/edit_program, :after = something Do I need to just override the entire edit and index views? Much better to avoid that: working through the UI you are relatively safe from interface changes and able to co-operate with other extensions. Is there some Javascript-y way to do this that I'm missing? Nope. best, will
Re: [Radiant] create new page on heroku
We ran into this before on another extension, there's an SQL difference with Postgres that affects some group queries. I just need to remember which one and I'll apply the fix. j On Aug 12, 2010, at 6:55 PM, Steven Southard wrote: With 9.1 on Heroku I am having a problem saving new pages. It saves pages I made on my localhost just won't make a new one. I get this: ActiveRecord::StatementInvalid (PGError: ERROR: invalid input syntax for integer: : SELECT * FROM page_parts WHERE (page_parts.id IN ('','')) AND (page_parts.page_id = NULL) ORDER BY id): /home/slugs/258179_58f1601_b92e/mnt/.gems/gems/will_paginate-2.3.14/ lib/will_paginate/finder.rb:170:in `method_missing' radiant (0.9.1) app/controllers/admin/resource_controller.rb:64:in `create' Is there a problem with page_parts or will_paginate-2.3.14? Any ideas? Cheers, Steven
Re: [Radiant] Customizing the user admin UI at the column level
On 8/12/10 6:47 PM, William Ross wrote: On 13 Aug 2010, at 00:35, Wes Gamble wrote: I have reviewed the contents of http://wiki.github.com/radiant/radiant/modifying-the-page-ui in depth. I have extension that modifies the user model to be attached to something called a program, and I've made the change in the DB, and modified the user model in my extension code like so: User class User ActiveRecord::Base belongs_to :program end so that the association will be there. Now, I would like to be able to display and edit program assignments for a given user in the admin. UI. In my extension's activate method, I added the following lines in the hopes of customizing the UI: admin.user.edit.form 'edit_program' admin.user.index.thead 'program_header' admin.user.index.tbody 'program_cell' thinking that the display of the user admin was super dynamic and it would just figure out how to display the edit components based on attribute type. But when I try to look at the index view of users, I get: `program_header' default partial not found! `program_cell' default partial not found! as errors in the index display. and `edit_program' default partial not found! as an error in the edit display. ** After looking into it, though, I see the admin/users/edit and admin/users/index views under the Radiant core are more or less hard-coded at the column level, but the error messages imply that I should be able to add a partial somewhere for my custom fields. Questions: What is the preferred way to customize at this level? You're on the right lines, though I would normally use this kind of idiom to get more control: admin.users.edit.add :form, edit_program, :after = something and then you need to create the partial, which in this case would be vendor/extensions/your_extension/app/views/admin/users/_edit_program.html.haml I did this, and created a file in the correct place, and entered the following in my activate method: admin.users.edit.add :form, edit_program, :after = edit_roles My partial looks like this: - form.edit_program do %p = f.label :program_id, t('program'), :class = optional = f.select :program_id, Program.all.collect {|p| [p.name, p.id]} and I get the classic |wrong number of arguments (0 for 1)| message when I try to render the form. This is because, AFAIK, the partial hasn't been passed the form variable as a local. How does the partial get rendered in the context of the existing form? Thanks, Wes