# I added the page\_attachments plugin and the site stopped wor

**URL:** <https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765>\
**Category:** Radiant CMS\
**Created:** [September 4, 2007, 7:57pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765 "2007-09-04T19:57:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 4, 2007, 7:57pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/1 "2007-09-04T19:57:24Z")

</div>

Actually, the site didn’t stop working entirely. It works fine under  
WEBrick. It just stopped working under Litespeed. Nothing is showing  
in the production.log at all.

When following the install instructions, I didn’t freeze to edge  
because I’m using 0.6.2. I did the steps below then restarted the  
server and I haven’t been able to connect using Litespeed since.

svn checkout [http://svn.seancribbs.com/svn/rails/plugins/extensions/](http://svn.seancribbs.com/svn/rails/plugins/extensions/)  
page\_attachments vendor/extensions/page\_attachments  
rake production db:migrate:extensions  
rake production radiant:extensions:page\_attachments:update

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 4, 2007, 8:06pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/2 "2007-09-04T20:06:35Z")

</div>

Do you have any other extensions installed? Do you have ImageScience,  
MiniMagick or RMagick?

Sean

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 4, 2007, 8:36pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/3 "2007-09-04T20:36:44Z")

</div>

Extensions: yes — I have a basic custom extension and the reorder  
extension.

I have ImageScience and RMagick. I have a bunch of Mephisto sites on  
the server using ImageScience (was originally using RMagick but  
switched over)

I tried blowing away the page\_attachments folder and I’m back in  
business using Litespeed. So Litespeed server definitely doesn’t  
like something about page\_attachments.  
I tried upgrading Litespeed and ruby-lsapi gem to the latest and that  
didn’t do it for page\_attachments either.

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 5, 2007, 6:19am UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/4 "2007-09-05T06:19:17Z")

</div>

I had some problems getting an app with the page\_attachments extension  
running in development mode with ImageScience installed as a gem. After  
removing the gem it seemed to work fine and I just went with RMagick.  
I’m  
using Mongrel.

I’m going to have another crack at getting ImageScience to work though  
as it  
sounds pretty good.

Dylan

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 5, 2007, 6:28am UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/5 "2007-09-05T06:28:18Z")

</div>

… That would be because I need FreeImage installed.

Sorry just ignore me. I’ll think before posting in future.

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 4, 2007, 9:44pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/6 "2007-09-04T21:44:06Z")

</div>

Chris,

My guess is that it is something about your Litespeed environment. The  
user that Litespeed runs as definitely needs permission to write to tmp/  
and public/ under your Radiant installation. Make sure those are OK and  
then if you can, post your production.log in a pastie.

Sean

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 5, 2007, 2:25pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/7 "2007-09-05T14:25:53Z")

</div>

Sean C. wrote:

> Do you have any other extensions installed? Do you have ImageScience,  
> MiniMagick or RMagick?
> 
> Sean

Hi Sean,  
I have the same problem!

0.6.2 so I don’t freeze.  
page\_attach is the last I added, all works great before…

My Hosting is HostingRails.  
I have aggregations, gallery and reorder extensions installed.  
I have all of three image-manipulation gems installed.

Any suggestion?

thanks!  
Andrea

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 5, 2007, 6:28pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/8 "2007-09-05T18:28:25Z")

</div>

Everyone,

Please, when you post a problem with page\_attachments or any other  
extension, please provide as much information as possible. These can  
include:

1. Which version of Radiant and Ruby you are using
2. Whether you froze Radiant or not, and to what
3. Any other gems or libraries you have installed
4. What app-server is being used (Mongrel, FCGI, LSAPI)
5. What operating system you are running on (distribution, version, etc)
6. Which database you use
7. Relevant contents of a log file, or a backtrace dump
8. What extensions you have installed
9. Anything else peculiar about your environment

I can help you better if you provide this information.

Sean

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 5, 2007, 7:15pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/9 "2007-09-05T19:15:42Z")

</div>

Thanks, Andrea. That email wasn’t directed at you specifically, but  
thank you.

For #7, production.log and fastcgi.crash.log if available. A pastie  
would be best ([http://pastie.caboo.se](http://pastie.caboo.se)).

Sean

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 5, 2007, 6:57pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/10 "2007-09-05T18:57:20Z")

</div>

> 1. Which version of Radiant and Ruby you are using
> 2. Whether you froze Radiant or not, and to what
> 3. Any other gems or libraries you have installed
> 4. What app-server is being used (Mongrel, FCGI, LSAPI)
> 5. What operating system you are running on (distribution, version, etc)
> 6. Which database you use
> 7. Relevant contents of a log file, or a backtrace dump
> 8. What extensions you have installed
> 9. Anything else peculiar about your environment

1. last version of both Radiant (0.6.2) and ruby (1.8.6)
2. I don’t froze radiant because is the last available
3. It’s a HostingRails account… so I have a lot of Gem. All the 3  
image manipulation required are installed.
4. FCGI
5. Sorry… I don’t know 😃 I’m newbie linux user, how can I check it  
via SSH?
6. MySQL 5
7. Wich? production.log?
8. aggregations, gallery and reorder extensions. Last is  
page\_attachments

There’s a unistall procedure eventually? Or I have to reinstall from a  
clean radiantcms gem?  
thanks!

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 5, 2007, 7:48pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/11 "2007-09-05T19:48:54Z")

</div>

Sean C. wrote:

> Thanks, Andrea. That email wasn’t directed at you specifically, but  
> thank you.
> 
> For #7, production.log and fastcgi.crash.log if available. A pastie  
> would be best ([http://pastie.caboo.se](http://pastie.caboo.se)).
> 
> Sean

Hi Sean,  
I tried to deactivate page\_attachments via MySQL. I have put “enabled”  
to 0 in extension schema. And my app started correctly. So I went to  
radiant extensions administration page and I tried to reactivate  
page\_attachments. After press “update” it crash 😃

lasts lines of production.log: [Parked at Loopia](http://pastie.caboo.se/94274)  
lasts lines of fastcgi.crash.log: [Parked at Loopia](http://pastie.caboo.se/94277) (it seams  
nothing relevant)

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 5, 2007, 10:45pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/12 "2007-09-05T22:45:39Z")

</div>

I’m going to be crazy!!! 😃

pixelin@zwingli [~]$ irb -rubygems  
irb(main):001:0\> require ‘image\_science’  
=\> true  
irb(main):002:0\> ImageScience  
=\> ImageScience  
irb(main):003:0\>

But the application crash… it works only if I deactivate it in mySQL.  
I’d like to give you ssh access 😃

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 5, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/13 "2007-09-05T23:06:16Z")

</div>

Hmm… that /is/ strange. You said FCGI, but are you using Apache,  
lighttpd, nginx, Litespeed? I’m wondering if it has to do with the  
environment established by the webserver. Also, have you tried running:

ruby public/dispatch.fcgi

If you get a 500 error and not an error stacktrace, your FCGI and  
Radiant is configured correctly for the user you are logged in as.

Sean

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 5, 2007, 8:10pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/14 "2007-09-05T20:10:53Z")

</div>

Andrea,

Your production log says that essentially, the PageAttachment class  
couldn’t be loaded. This usually indicates a failure to load any  
required files within the context of page\_attachment.rb. Since there  
are no explicit requires inside the file, it must be in attachment\_fu  
(the has\_attachment call). This probably means that the user your FCGI  
process runs as cannot require any of your image libraries  
(ImageScience, MiniMagick, RMagick). In the case of ImageScience, it  
may be that it cannot write to the FCGI user’s ~/.ruby\_inline directory  
to compile the code. If possible, run this as your FCGI user:

irb -rubygems

> > require ‘image\_science’  
> > ImageScience

If it worked, you should get no error.

Sean

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 6, 2007, 12:44am UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/15 "2007-09-06T00:44:28Z")

</div>

Nothing… I’ve tried all I can do…

Nothing… It doesn’t work! ☹

In Italy it’s 1AM 😃 I need to sleep (a lot!)

bYe!

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 6, 2007, 2:13am UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/16 "2007-09-06T02:13:30Z")

</div>

Has anyone written a columnize extension that will take content, and  
split it into columns in a flow in the layout? I need to make that  
happen in an easy way for a new website, and am looking for a slick  
way to automate it so that the columns are split at the right place.  
-Mark

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 6, 2007, 6:41pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/17 "2007-09-06T18:41:50Z")

</div>

Andrea O. wrote:

> Nothing… I’ve tried all I can do…
> 
> Nothing… It doesn’t work! ☹
> 
> In Italy it’s 1AM 😃 I need to sleep (a lot!)
> 
> bYe!

Sean,

I’d like to force rmagick as default gem for image manipulation… How  
can I do this in page\_attachments?

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 5, 2007, 11:29pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/18 "2007-09-05T23:29:40Z")

</div>

The server is apache with fcgi for rails apps…

pixelin@zwingli [~/indiaandmore]$ ruby public/dispatch.fcgi  
Loaded suite public/dispatch.fcgi  
Started

Finished in 0.000223 seconds.

0 tests, 0 assertions, 0 failures, 0 errors

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 7, 2007, 12:46am UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/19 "2007-09-07T00:46:31Z")

</div>

Perfect… this is a working solution! I don’t know why, but  
imagescience and imagemagick gems aren’t full functional…

with rmagick it works fine!!!

Dominic wrote:

> I believe you add :processor =\> :rmagick^M to page\_attachment.rb:
> 
> has\_attachment :storage =\> :file\_system, ^M  
> :thumbnails =\> {:icon =\> ‘50x50\>’},^M  
> :max\_size =\> 10.megabytes,^M  
> :processor =\> :rmagick^M

---

<div class="post-metadata">

**Author:** ![chrisdwan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Post date:** [September 6, 2007, 7:09pm UTC](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765/20 "2007-09-06T19:09:44Z")

</div>

I believe you add :processor =\> :rmagick^M to page\_attachment.rb:

has\_attachment :storage =\> :file\_system, ^M  
:thumbnails =\> {:icon =\> ‘50x50\>’},^M  
:max\_size =\> 10.megabytes,^M  
:processor =\> :rmagick^M

[Next page](https://www.ruby-forum.com/t/i-added-the-page-attachments-plugin-and-the-site-stopped-wor/113765.md?page=2)
