Comparing version 24 and version 23
This page exists because many people have had difficulty installing and using the "page_attachments":http://dev.radiantcms.org/svn/radiant/trunk/extensions/page_attachments extension. Please refer to this page before questioning the mailing-list. Thanks, Sean h2. First things firstMakeFirst,sure your Radiant project is functional. You can find directions for installing"install andconfiguringconfigureRadiantRadiant":http://radiantcms.org/download/"here":http://radiantcms.org/blog/archives/2007/04/24/radiant-0-6-lapidary-release/.and check it’s working. This includes making sure your web server will correctly run the dispatcher, etc. Please consult your hosting provider for information on how to run a Rails application likeRadiant.Radiant if necessary. If you wantpage_attachmentsto be able to display thumbnails of uploaded images, make sure that one ofimage_science,image_science,mini-magick,mini-magick, orrmagickis installed on the server. You can check this by running:Both$ gem listthistheplugin"page_attachment extension":http://github.com/radiant/radiant-page-attachments-extension/tree/master and therequired"attachment_fuattachment_fupluginplugin":http://github.com/technoweenie/attachment_fu/tree/master are now available at"Github":http://github.com/radiant/radiant-page-attachments-extension/tree/master"Github":http://github.com/ -- you can use eitherresourcesvn or git atpresent.present, although git is recommended. h3. Installattachment_fu: Via svn:Via git:$ cd /path/to/radiant $ svn export http://svn.techno-weenie.net/projects/plugins/attachment_fu/ vendor/plugins/attachment_fuFailing to do the above step will result in a "$ cd /path/to/radiant $ git clone git://github.com/technoweenie/attachment_fu.git vendor/plugins/attachment_fuuninitialized constant Technoweenie::AttachmentFu" error. If you get the erroruninitialized constant Technoweenie::AttachmentFu::Backendstry this instead: Via svn:Via git:$ svn export http://svn.techno-weenie.net/projects/plugins/attachment_fu/ vendor/extensions/page_attachments/vendor/plugins/attachment_fuh2. Step-by-Step 1. Download the$ git clone git://github.com/technoweenie/attachment_fu.git vendor/extensions/page_attachments/vendor/plugins/attachment_fupage_attachmentsextension into the proper directory using 'svn' (you can use checkout or export) or git. If you are still using the 0.6.4 gem, you will need revision 58, *see below*: Via svn:Via git:$ cd /path/to/radiant $ svn checkout http://svn.radiantcms.org/radiant/trunk/extensions/page_attachments vendor/extensions/page_attachmentsFor anyone using 0.6.4, you will need to get$ cd /path/to/radiant $ git clone git://github.com/radiant/radiant-page-attachments-extension.git vendor/extensions/page_attachmentspage_attachmentsrevision 58 from Sean's svn repository:2. page_attachments requires Radiant 0.6.2, so either freeze edge or use the 0.6.2 gem or later:$ svn export http://svn.seancribbs.com/svn/rails/plugins/extensions/page_attachments vendor/extensions/page_attachments -r 583. Now run the extension migrations (it's necessary to specify the database, eg production):$ rake radiant:freeze:edge4. Run the 'update' task to copy the appropriate assets from the page_attachments extension:$ rake production db:migrate:extensions5. Restart your application and/or web server. h2. Using page_attachments When you login to your Radiant admin and edit a page, you should see an area below the main interface that says "Attachments (0)". Click the "+" icon to add an attachment. You can upload multiple attachments at once. Attachments will not be saved or removed until the whole page is saved. Therefore, if you accidentally deleted something you meant to keep, simply cancel the page-edit. h3. Referencing attachments in the page Please see the Tag Reference in the page-editing interface for the latest documentation on how to use attachments in a page. h3. Troubleshooting h4. Migration problems If you have a problem running the migrate task, and it fails with an error something like this.$ rake production radiant:extensions:page_attachments:updateIt means you have installed the ImageScience gem but you don't have FreeImage installed. So, either install FreeImage or uninstall the gem like so:ld: library not found for -lfreeimage collect2: ld returned 1 exit statush4. RubyInline problem If you're using ImageScience as a user without a home directory, you may see this error:gem uninstall image_scienceThis is caused by RubyInline not having a place to store its generated files and can be easily fixed by specifying a path in your environment file like so:Define INLINEDIR or HOME in your environment and try againENV['INLINEDIR'] = File.join(RAILS_ROOT,'tmp','ruby_inline')
