 |
Forums |
Admin Start New Thread
By: Stephen Weiss
RE: Problems with Mini-Magick - and no docs? [ reply ] 2006-04-14 13:42
|
Works great now! I had to enter:
require 'vendor/plugins/mini_magick_plugin/lib/mini_magick.rb'
to my images model. I'm not sure if that's the correct way to do it, but it got it working so for the mean time I'll let it stay that way. It's only in development anyway :-) Thank you so much! It's so helpful!
|
By: Corey J
RE: Problems with Mini-Magick - and no docs? [ reply ] 2006-04-12 00:54
|
Hey Stephen,
I just updated mini_magick to version 1.1.0 and included a rails plugin version of the code which should help you out.
To install the plugin do this...
Go to the download section in rubyforge and get the mini_magick_plugin-1.1.0.zip file. Unzip this and place it in your RAILS_ROOT/vendor/plugins folder. After that everything should work fine.
If that doesn't work you can install it this quick and 'dirty' way.
copy mini_magick.rb to RAILS_ROOT/lib/
then add...
require "mini_magick"
...to RAILS_ROOT/config/environment.rb
Let me know if that works for you.
Corey
|
By: Stephen Weiss
Problems with Mini-Magick - and no docs? [ reply ] 2006-04-11 22:03
|
I went to install RMagick for my new Ruby on Rails project and it was a total bust - they want me to install all this darwin ports crap that will ruin my system even though I have a perfectly good ImageMagick that works flawlessly with PHP already.
So, now I want to try MiniMagick, which sounds better anyway, but I seriously can't win here. I installed the gem, and added these lines to my function:
image_to_process = MiniMagick::Image.from_file(self.filename)
image_to_process.resize "100x150"
image.write self.batch.path + 'thumbs/' + self.filename
So, that doesn't work. Can't find constant MiniMagick.
I add 'require "mini_magick"' to the top of the file. No change.
I add mini_magick.rb to the vendor/plugins folder of my rails app. Still no change!!!
I can't find any real documentation on this plugin, just a few snippets that told me to do the above two things, neither of which worked. What exactly do I have to do to get the gem to work? Would it just make my life easier to get the zip file and install it some other way?
I can't believe it's this difficult to get basic image manipulation in Ruby on Rails - I mean, my ImageMagick works just fine with everything else!
This is on Mac OS X 10.3 (panther) with imagemagick 6.1.7, ruby 1.8.4 and ... well, I installed rails a few days ago, so probably the latest version. Thanks for any help, I really need to get this part of the program done and move on!
|
|
 |