I''d like to implement a system in a Rails app where I allow the user to upload an image file, and then the app takes that image and manipulates it, saving a thumbnail, small, and original size version of the file to the server. How would I go about doing that? Thanks, Jeff -- Posted via http://www.ruby-forum.com/.
Jeff Coleman wrote:> > I''d like to implement a system in a Rails app where I allow the user to > upload an image file, and then the app takes that image and manipulates > it, saving a thumbnail, small, and original size version of the file to > the server. > > How would I go about doing that?ruby bindings to libimagemagick, http://rmagick.rubyforge.org/ -- Posted via http://www.ruby-forum.com/.
Christophe Gimenez
2006-Mar-27 08:50 UTC
[Rails] Re: Image manipulation/resizing server-side?
You should have a look to mini_magick which is less resource demanding than RMagick. Then it''s just a simple as : thumbnail = MiniMagick::Image.from_file(src_filename) thumbnail.resize "500x400" thumbnail.write(dst_filename) You need to have imagemagick installed (native application) -- Posted via http://www.ruby-forum.com/.
Christophe Gimenez wrote:> You should have a look to mini_magick which is less resource demanding > than RMagick. > > Then it''s just a simple as : > > thumbnail = MiniMagick::Image.from_file(src_filename) > thumbnail.resize "500x400" > thumbnail.write(dst_filename) > > You need to have imagemagick installed (native application)Nice! Thanks for the info. Jeff -- Posted via http://www.ruby-forum.com/.
I''m having trouble using gem to install either RubyMagick or Mini-Magick. This is what happens when I try to install RMagick on my Windows XP computer: C:\rails>gem install rmagick --include-dependencies Attempting local installation of ''rmagick'' Building native extensions. This could take a while... configure:1: Can''t exec \bin\sh (fatal) ERROR: Error installing gem rmagick[.gem]: ERROR: Failed t tension. Gem files will remain installed in c:/ruby/lib/ruby/gems/1. for inspection. ruby configure install rmagick --include-dependencies\n What am I doing wrong? Thanks, Jeff -- Posted via http://www.ruby-forum.com/.
That full error message should be "Failed to build native extension". Jeff -- Posted via http://www.ruby-forum.com/.
Chang Sau Sheong
2006-Mar-28 15:42 UTC
[Rails] Re: Image manipulation/resizing server-side?
You need to install the gem locally. Download it first from the site and do a local installation of the gem. Jeff Coleman wrote:> I''m having trouble using gem to install either RubyMagick or > Mini-Magick. > > This is what happens when I try to install RMagick on my Windows XP > computer: > > C:\rails>gem install rmagick --include-dependencies > Attempting local installation of ''rmagick'' > Building native extensions. This could take a while... > configure:1: Can''t exec \bin\sh (fatal) > ERROR: Error installing gem rmagick[.gem]: ERROR: Failed t > tension. > Gem files will remain installed in c:/ruby/lib/ruby/gems/1. > for inspection. > ruby configure install rmagick --include-dependencies\n > > What am I doing wrong? > > Thanks, > > Jeff > >-- Sau Sheong http://www.saush.com http://read.saush.com http://jaccal.sourceforge.net
Jeff Coleman
2006-Mar-28 17:27 UTC
[Rails] Re: Re: Image manipulation/resizing server-side?
I''m afraid I get the same message when I try to install it locally: C:\rails>gem install -l rmagick-1.10.1 Attempting local installation of ''rmagick-1.10.1'' Building native extensions. This could take a while... configure:1: Can''t exec \bin\sh (fatal) ERROR: Error installing gem rmagick-1.10.1[.gem]: ERROR: Failed to build gem na tive extension. Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.10.1 for inspection. ruby configure install -l rmagick-1.10.1\n Results logged to c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.10.1/gem_make.out Again I''m sure there must be something very obvious I''m missing, but I''m not sure what it could be... Jeff Chang Sau Sheong wrote:> You need to install the gem locally. Download it first from the site and > do a local installation of the gem. > > Jeff Coleman wrote: >> ERROR: Error installing gem rmagick[.gem]: ERROR: Failed t >> >> > > > -- > Sau Sheong > > http://www.saush.com > http://read.saush.com > http://jaccal.sourceforge.net-- Posted via http://www.ruby-forum.com/.
Carl-Johan Kihlbom
2006-Mar-28 18:57 UTC
[Rails] Re: Re: Image manipulation/resizing server-side?
Have you installed ImageMagick? On 3/28/06, Jeff Coleman <progressions@gmail.com> wrote:> > I''m afraid I get the same message when I try to install it locally: > > C:\rails>gem install -l rmagick-1.10.1 > Attempting local installation of ''rmagick-1.10.1'' > Building native extensions. This could take a while... > configure:1: Can''t exec \bin\sh (fatal) > ERROR: Error installing gem rmagick-1.10.1[.gem]: ERROR: Failed to > build gem na > tive extension. > Gem files will remain installed in > c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.10.1 > for inspection. > ruby configure install -l rmagick-1.10.1\n > > Results logged to > c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.10.1/gem_make.out > > > Again I''m sure there must be something very obvious I''m missing, but I''m > not sure what it could be... > > > Jeff > > > > Chang Sau Sheong wrote: > > You need to install the gem locally. Download it first from the site and > > do a local installation of the gem. > > > > Jeff Coleman wrote: > >> ERROR: Error installing gem rmagick[.gem]: ERROR: Failed t > >> > >> > > > > > > -- > > Sau Sheong > > > > http://www.saush.com > > http://read.saush.com > > http://jaccal.sourceforge.net > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Jeff Coleman
2006-Mar-28 19:15 UTC
[Rails] Re: Re: Re: Image manipulation/resizing server-side?
Carl-Johan Kihlbom wrote:> Have you installed ImageMagick?I have installed the ImageMagick DLL installer for Windows found here: http://www.imagemagick.org/download/binaries/ImageMagick-6.2.6-6-Q16-windows-dll.exe Jeff -- Posted via http://www.ruby-forum.com/.
This is just another note to see if anyone has any idea why the RMagick gem won''t install, either locally or remotely. Anyone? Jeff Coleman wrote:> > I''m afraid I get the same message when I try to install it locally: > > C:\rails>gem install -l rmagick-1.10.1 > Attempting local installation of ''rmagick-1.10.1'' > Building native extensions. This could take a while... > configure:1: Can''t exec \bin\sh (fatal) > ERROR: Error installing gem rmagick-1.10.1[.gem]: ERROR: Failed to > build gem na > tive extension. > Gem files will remain installed in > c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.10.1 > for inspection. > ruby configure install -l rmagick-1.10.1\n > > Results logged to > c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.10.1/gem_make.outThanks, Jeff -- Posted via http://www.ruby-forum.com/.
Jeff Coleman wrote:> This is just another note to see if anyone has any idea why the RMagick > gem won''t install, either locally or remotely. Anyone? > > Jeff Coleman wrote: >> I''m afraid I get the same message when I try to install it locally: >> >> C:\rails>gem install -l rmagick-1.10.1 >> Attempting local installation of ''rmagick-1.10.1'' >> Building native extensions. This could take a while... >> configure:1: Can''t exec \bin\sh (fatal) >> ERROR: Error installing gem rmagick-1.10.1[.gem]: ERROR: Failed to >> build gem na >> tive extension. >> Gem files will remain installed in >> c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.10.1 >> for inspection. >> ruby configure install -l rmagick-1.10.1\n >> >> Results logged to >> c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.10.1/gem_make.outYou are trying to execute a shell script in a DOS shell. \bin\sh is the path to a Unix command interpreter, and you more than likely don''t have it and if you do, it is not in \bin or c:\bin Drilling down, the program that is trying to execute itself with sh is the program configure, which is a gnu utility to configure a program to be built in a particular environment. Long story short, you are either trying to the wrong package (you downloaded the Unix or maybe Cygwin version of rmagick), or you need to be building rmagick in Cygwin. I don''t have any first hand knowledge of using gem in Windows, but that should point you in the right general direction. -- Ray
Hello, I was wondering if anyone could point me to a plugin or framework on how to expose SOAP services via rails controllers. I am particularly interested in being able to post a SOAP document as an attachment and handle it in the controller. Thanks for your help.
Thanks, Ray, you were exactly right. I did a bit more digging and found the appropriate Win32 installers and instructions. :) Jeff -- Posted via http://www.ruby-forum.com/.
Try the documentation at http://manuals.rubyonrails.com/read/book/10 Joseph Graham wrote:> Hello, > I was wondering if anyone could point me to a plugin or framework on how to > expose SOAP services via rails controllers. I am particularly interested in > being able to post a SOAP document as an attachment and handle it in the > controller. Thanks for your help. > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >-- Sau Sheong http://www.saush.com http://read.saush.com http://jaccal.sourceforge.net