I added the page_attachments plugin and the site stopped wor

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/
page_attachments vendor/extensions/page_attachments
rake production db:migrate:extensions
rake production radiant:extensions:page_attachments:update

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

Sean

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.

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

… That would be because I need FreeImage installed.

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

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

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

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

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).

Sean

  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 :smiley: 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!

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).

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 :smiley:

lasts lines of production.log: Parked at Loopia
lasts lines of fastcgi.crash.log: Parked at Loopia (it seams
nothing relevant)

I’m going to be crazy!!! :smiley:

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 :smiley:

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

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

Nothing… I’ve tried all I can do…

Nothing… It doesn’t work! :frowning:

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

bYe!

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

Andrea O. wrote:

Nothing… I’ve tried all I can do…

Nothing… It doesn’t work! :frowning:

In Italy it’s 1AM :smiley: 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?

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

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

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