Installing modporter for Rails on Ubuntu Hardy Heron

[tweetmeme]
It’s not an uncommon scenario for Apache to not play nicely with Rails when dealing with multipart forms and large uploaded files. There are a few solutions out there, but the best we have seen is modporter from the guys at ActionRails.

So, you’ll need a few things to beef up Apache; if you haven’t got them already:

sudo apt-get install libapache2-mod-apreq2
sudo apt-get install libapreq2-dev
sudo apt-get install apache2-threaded-dev

Now fetch the latest ModPorter from github from here. Once you have downloaded and unpacked this, edit the Rakefile and change the apxs variable to apxs2, then type:

cd modporter-directory
rake

And, you’ll probably want the modporter plugin for Rails to give you a nice consistent interface for uploaded files rather than differentiate String IOs and UploadedFile objects.

If you have git:

script/plugin install git://github.com/actionrails/modporter-plugin.git

Otherwise, download the tar from here, unpack and stick in your vendor/plugins directory.

Now configure Apache to use load some additional modules, edit your apache.conf file to include (your path to modules may be different):

LoadModule apreq_module modules/mod_apreq2.so
LoadModule porter_module modules/mod_porter.so
Advertisements

One Response to “Installing modporter for Rails on Ubuntu Hardy Heron”

  1. Installing modporter for Rails on Ubuntu Hardy Heron « Fringley's Blog Says:

    […] reading Installing modporter for Rails on Ubuntu Hardy Heron on my old blog… Tags modporter, rails, ruby, ubuntu Categories […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: