While image_science doesn't directly require native C compilation, it uses
RubyInline (which does do behind-the-scenes compilations during runtime) and
requires the FreeImage library (which would have to be built).

You should uninstall the image_science gem and let your installation of
Insoshi use rmagick instead.  It's one of MT's pre-built/installed gems and
serves the same function (actually does a bit more than image_science but we
currently just use it for resizing images).

I believe we've taken out explicit mention of image_science in the Photos
model so attachment_fu should then start using rmagick automatically.  If
not, here's a post from Michael from early on in the release of Insoshi on
changing from image_science to rmagick that details how to explicitly set
the processor (under the has_attachment in app/models/photo.rb):

Hi Craig,

Glad to see you got some mileage out of RailsSpace! The Insoshi code
base might prove useful with your image issue.  We use the
attachment_fu plugin to handle images, instead of rolling our own as
we did in RailsSpace.  Take a look at the Insoshi Photo model for some
ideas.  If you do end up using the Photo data model, be sure to change

:processor => 'ImageScience'

to

:processor => 'Rmagick'

You might also want to take a look at
http://clarkware.com/cgi/blosxom/2007/02/24 for some more guidance.

We started RailsSpace way before Heroku was even a glimmer in the
founders' eyes.  If we'd know what they were going to do, we might
have made more of an effort to use RMagick!

Cheers,

Michael

Search the Google group for "rmagick" as Fountain had posted up an issue and
resolution when uploading images that you may or may not run into depending
on some of MT's web configuration settings.

As far as the Bad Gateway error you're running into, I'm not sure what the
issue is.  Switching to rmagick may resolve it because of the exception
thrown with RubyInline and image_science.   If you still run into this, take
a look at log/production.log to see if there's a exception trace.

Long

On Wed, Jun 18, 2008 at 3:44 AM, Eiso <[EMAIL PROTECTED]> wrote:

>
> Hi Long,
>
> Thank you very much for your extensive answer.
>
> I have setup an account with Media Temple, followed all the steps on
> their site to install Ruby.
> I then followed the Insoshi Install Guide, I installed the following
> Gems:
>
>    * rails
>    * ferret - for search capability
>    * image_science - if you're using FreeImage
>    * mysql - if you're using MySQL as your database engine
>
> I then updated my database.yml file to MySQL details (this worked out
> fine).
>
> Then I executed: rake install, which also worked out.
>
> I then executed: rake db:sample_data:reload , which executed fine up
> untill 26. after that the following errors came:
>
> ---
>
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 3:23: FreeImage.h: No such file or directory
> /tmp/ruby.hiddendomainname.com/.ruby_inline/
> Inline_ImageScience_aa58.c: In function `unload':
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 9: error: `FIBITMAP' undeclared (first use in this function)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 9: error: (Each undeclared identifier is reported only once
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 9: error: for each function it appears in.)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 9: error: `bitmap' undeclared (first use in this function)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 9: error: parse error before ')' token
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 11: warning: implicit declaration of function `FreeImage_Unload'
> /tmp/ruby.hiddendomainname.com/.ruby_inline/
> Inline_ImageScience_aa58.c: At top level:
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 17: error: parse error before '*' token
> /tmp/ruby.hiddendomainname.com/.ruby_inline/
> Inline_ImageScience_aa58.c: In function `wrap_and_yield':
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 18: error: `fif' undeclared (first use in this function)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 18: error: `self' undeclared (first use in this function)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 20: error: `image' undeclared (first use in this function)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/
> Inline_ImageScience_aa58.c: At top level:
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 26: error: parse error before "FIBITMAP"
> /tmp/ruby.hiddendomainname.com/.ruby_inline/
> Inline_ImageScience_aa58.c: In function `copy_icc_profile':
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 27: error: `FREE_IMAGE_FORMAT' undeclared (first use in this function)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 27: error: parse error before "fif"
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 28: error: `fif' undeclared (first use in this function)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 28: error: `FIF_PNG' undeclared (first use in this function)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 28: warning: implicit declaration of function
> `FreeImage_FIFSupportsICCProfiles'
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 29: error: `FIICCPROFILE' undeclared (first use in this function)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 29: error: `profile' undeclared (first use in this function)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 29: warning: implicit declaration of function
> `FreeImage_GetICCProfile'
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 29: error: `from' undeclared (first use in this function)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 31: warning: implicit declaration of function
> `FreeImage_CreateICCProfile'
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 31: error: `to' undeclared (first use in this function)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/
> Inline_ImageScience_aa58.c: At top level:
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 37: error: parse error before "fif"
> /tmp/ruby.hiddendomainname.com/.ruby_inline/
> Inline_ImageScience_aa58.c: In function `FreeImageErrorHandler':
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 41: error: `fif' undeclared (first use in this function)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 41: error: `FIF_UNKNOWN' undeclared (first use in this function)
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 41: warning: implicit declaration of function
> `FreeImage_GetFormatFromFIF'
> /tmp/ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c:
> 42: error: `message' undeclared (first use in this function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb: In function `with_image':
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:146: error: `FREE_IMAGE_FORMAT' undeclared (first use
> in this function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:146: error: parse error before "fif"
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:148: error: `fif' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:148: warning: implicit declaration of function
> `FreeImage_GetFileType'
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:149: error: `FIF_UNKNOWN' undeclared (first use in
> this function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:149: warning: implicit declaration of function
> `FreeImage_GetFIFFromFilename'
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:150: warning: implicit declaration of function
> `FreeImage_FIFSupportsReading'
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:151: error: `FIBITMAP' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:151: error: `bitmap' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:153: error: `FIF_JPEG' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:153: error: `JPEG_ACCURATE' undeclared (first use in
> this function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:154: warning: implicit declaration of function
> `FreeImage_Load'
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb: In function `with_crop':
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:168: error: `FIBITMAP' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:168: error: `copy' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:170: error: `bitmap' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:170: error: parse error before ')' token
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:172: warning: implicit declaration of function
> `FreeImage_Copy'
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb: In function `height':
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:178: error: `FIBITMAP' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:178: error: `bitmap' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:178: error: parse error before ')' token
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:180: warning: implicit declaration of function
> `FreeImage_GetHeight'
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb: In function `width':
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:186: error: `FIBITMAP' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:186: error: `bitmap' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:186: error: parse error before ')' token
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:188: warning: implicit declaration of function
> `FreeImage_GetWidth'
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb: In function `resize':
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:198: error: `FIBITMAP' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:198: error: `bitmap' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:198: error: parse error before ')' token
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:199: error: `image' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:199: warning: implicit declaration of function
> `FreeImage_Rescale'
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:199: error: `FILTER_CATMULLROM' undeclared (first use
> in this function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb: In function `save':
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:209: error: `FREE_IMAGE_FORMAT' undeclared (first use
> in this function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:209: error: parse error before "fif"
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:210: error: `fif' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:210: error: `FIF_UNKNOWN' undeclared (first use in
> this function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:211: warning: implicit declaration of function
> `FreeImage_FIFSupportsWriting'
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:212: error: `FIBITMAP' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:212: error: `bitmap' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:212: error: parse error before ')' token
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:213: error: `FIF_JPEG' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:213: error: `JPEG_QUALITYSUPERB' undeclared (first
> use in this function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:214: error: `FIF_PNG' undeclared (first use in this
> function)
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:214: warning: implicit declaration of function
> `FreeImage_DestroyICCProfile'
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:215: warning: implicit declaration of function
> `FreeImage_Save'
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb: In function `Init_Inline_ImageScience_aa58':
> /home/44618/data/rubygems/gems/gems/image_science-1.1.3/lib/
> image_science.rb:233: warning: implicit declaration of function
> `FreeImage_SetOutputMessage'
> rake aborted!
> error executing "gcc -shared   -fPIC -Wall -g -fno-strict-aliasing -
> O2  -fPIC -I /usr/lib/ruby/1.8/i386-linux  -I /usr/include -L/usr/lib -
> o \"/tmp/ruby.hiddendomainname.com/.ruby_inline/
> Inline_ImageScience_aa58.so\" \"/tmp/
> ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c\<http://ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c%5C>"
> -
> lfreeimage -lstdc++ ": 256
> Renamed /tmp/ruby.hiddendomainname.com/.ruby_inline/
> Inline_ImageScience_aa58.c to /tmp/
> ruby.hiddendomainname.com/.ruby_inline/Inline_ImageScience_aa58.c.bad
>
> ----
>
> I left those errors as it was and I continued to setup the application
> on the domain (I have put Insoshi in a folder named socialnetwork).
>
> mtr -u [EMAIL PROTECTED] -p <password> add socialnetwork $PWD
> domain.com
> mtr start socialnetwork
> mtr generate_htaccess socialnetwork
> mtr create_link socialnetwork
>
> When I visit domain.com I get the following error:
>
> --
>
> Bad Gateway
>
> The proxy server received an invalid response from an upstream server.
> Apache/2.0.54 Server at domain.com Port 80
>
> --
>
> I hope someone is able to assist me on getting Insoshi up and running.
>
> Best regards,
>
> Eiso
>
> On Jun 17, 9:18 pm, "Long Nguyen" <[EMAIL PROTECTED]> wrote:
> > Root access is preferred but not 100% required if all the dependent gems
> are
> > installed.  It looks like they have rmagick and ferret installed along
> with
> > mysql.  (MediaTemple does look it has a way to install other gems as long
> as
> > they don't require native C compiling to install.  But you should be good
> > with what they have since we package those dependencies under
> vendor/plugins
> > and vendor/gems.)
> >
> > On a run-through of the FAQ
> > page<http://www.mediatemple.net/webhosting/gs/faq.htm#64>you linked
> > to, it looks like you should be okay with running Insoshi on the
> > setup.  The only thing you may need to change is how ferret runs in
> > production mode (the default runtime enviroment at MT).  You have the
> option
> > of
> >
> > 1. Leaving the setup as is and start the ferret background process using
> >
> > script/ferret_server -e production start
> >
> > when you're in the application directory
> >
> > OR
> >
> > 2. Updating config/ferret_server.yml and comment out the production
> runtime
> > information.  This tells acts_as_ferret to run inline with the mongrel
> > instead of trying to communicate with an external server process.  You
> can
> > only do this if you have a single mongrel process running which seems to
> be
> > case at MT.
> >
> > Let me know if you run into any issues getting Insoshi installed.
> >
> > At this point it looks like I should start tracking the various hosting
> > services that are being used and put together a FAQ/issues list.
> >
> > Long
> >
> >
> >
> > On Tue, Jun 17, 2008 at 8:32 AM, Eiso <[EMAIL PROTECTED]> wrote:
> >
> > > Dear Insoshi Community,
> >
> > > I am looking to install Insoshi on a MediaTemple GridService (hosting
> > > account). They offer a RoR GridContainer and ssh access (no root
> > > access) (more details:
> http://www.mediatemple.net/webhosting/gs/faq.htm#64
> > > ).
> > > Am I able to install Insoshi on this type of account and if so how?
> >
> > > I am new to RoR but would still love to run my social network on the
> > > Insoshi platform.
> >
> > > Best regards,
> >
> > > Eiso
> >
> > --
> > Long Nguyen
> > [EMAIL PROTECTED]
> >
>


-- 
Long Nguyen
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
Insoshi developer site: http://dogfood.insoshi.com/
Insoshi documentation: http://docs.insoshi.com/

You received this message because you are subscribed to the Google
Groups "Insoshi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/insoshi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to