Comparing version 23 and version 22
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 first Make sure your Radiant project is functional. You can find directions for installing and configuring Radiant "here":http://radiantcms.org/blog/archives/2007/04/24/radiant-0-6-lapidary-release/. 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 like Radiant. If you want page_attachments to be able to display thumbnails of uploaded images, make sure that one of image_science, mini-magick, or rmagick is installed on the server. You can check this by running:Both this plugin and the required$ gem listattachment_fuplugin are now available at "Github":http://github.com/radiant/radiant-page-attachments-extension/tree/master -- you can use either resource at present. h3. Installattachment_fu:attachment_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_fu"uninitialized"uninitialized constant" error. If you get the errorTechnoweenie::AttachmentFu"Technoweenie::AttachmentFuuninitialized 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 usingthe'svn'command(you can use checkout orexport).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/my/radiant/project/path/to/radiant $ svn checkout http://svn.radiantcms.org/radiant/trunk/extensions/page_attachments vendor/extensions/page_attachmentsFor$ cd /path/to/radiant $ git clone git://github.com/radiant/radiant-page-attachments-extension.git vendor/extensions/page_attachmentsrevisionanyone58,using 0.6.4, you will need to getitpage_attachmentsrevision 58 from Sean'spersonalsvn 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$ rake radiant:freeze:edgemigrations:migrations (it's necessary to specify the database, eg production):4. 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')
