class Files
def self.save(upload)
...
img = Magick::Image.read('public/data/nature6.jpg').first
end
end
And I still getting error in subject of this post. I tried to move
require 'mongo'
require 'RMagick'
into the method self.save, but without succes...
But if I try to test, that the plugin is installed fine (test.rb):
require 'rubygems'
require 'RMagick'
puts Magick::Long_version
I will get following output:
This is RMagick 2.13.1 ($Date: 2009/12/20 02:33:33 $) Copyright (C) 2009
by Timothy P. Hunter
Built with ImageMagick 6.6.7-8 2011-03-16 Q8 http://www.imagemagick.org
Built for ruby 1.8.7
Web page: http://rmagick.rubyforge.org
Email: rmagick@rubyforge.org
So I guess this plugin is installed right... And I have a problem, that
I don't know why this plugin doesn't works in RoR application...
Hi Fred,
thank you for your reply. I tried to edit Gemfile by your hint, but
unfortunatelly, without successful...
But I found one interesting thing -- if I will to delete content of
Gemfile, my app work normally (but of course, the problem with RMagick
is here still), as if there the content was (in that Gemfile)... it's
really weird...
Hi Fred,
thank you for your reply. I tried to edit Gemfile by your hint, but
unfortunatelly, without successful...
But I found one interesting thing -- if I will to delete content of
Gemfile, my app work normally (but of course, the problem with RMagick
is here still), as if there the content was (in that Gemfile)... it's
really weird...
Is your app actually using the gemfile at all? If you're using rails
2.3 there some messing around you need to do in order to get bundler
to work (it's all on the bundler home page)
If I started with RoR, I was excited from it... but the problems with
plugins I really don't like... And the problems really comes again, when
I will to try to upload my app on hosting and there will not installed
all of plugins in my app...
You can "freeze" all of the gems into your site, so you don't have to rely on your host's version of anything. Have a look on the bundler site for the incantation. These frozen Gems get partially compiled (at least that's how it appears to me) so there may even be some advantage to running them this way.
Hi Fred,
thank you for your reply. I tried to edit Gemfile by your hint, but
unfortunatelly, without successful...
But I found one interesting thing -- if I will to delete content of
Gemfile, my app work normally (but of course, the problem with RMagick
is here still), as if there the content was (in that Gemfile)... it's
really weird...
I think you need to read up on how bundle works, and where it writes
information.
Edit your gemfile to your heart's delight. If you don't run "bundle
install", then those changes aren't seen/processed.
Why weren't you successful with editing your gemfile? (your second post
in this thread)
It seems a relatively simple thing, and if you edited that file, and did
a "bundle install", and that process reported issues, then you should
resolve those.
Thank you for your replies guys. I made "bundle install" in my root of
app... but if I see then on plugins, I didn't see RMagick... The output
from "bundle show" is the same, as I posted here (9th post)...
Where can be the error? What could be wrong yet...
Look back at Fred's first post (as I suggested) where he explained
that is not the correct syntax for Gemfile. I suggest you do some
research on how to use bundler.