Giter VIP home page Giter VIP logo

fleximage's People

Contributors

aa365 avatar alexjwayne avatar bjjb avatar jlsync avatar kou avatar lassej avatar miau avatar moser avatar pixeltrix avatar ralph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fleximage's Issues

Example for using Fleximage as association

Hi,
thanks for this great plugin. I currently try to get this to work with the fleximage model class in a relation / association.

I have a User model and a Image model.
class User < ActiveRecord::Base
belongs_to: image
end

class Image < ActiveRecord::Base
acts_as_fleximage :image_directory => 'public/images/uploaded_photos'
end

Can you please give an example of how the Upload form (view) for this should look like for this scenario?
Maybe this is something obvious, but I would love to see something about associations in the documentation.

I would like to reuse the Image model in a generic way for other objects too.

Thanks
Christoph

GraphicsMagick 1.1.11

ActionView::TemplateError (the `strip!' method is not supported by GraphicsMagick 1.1.11)

Loading default image is not working

Hi,
I don't know if this is occurring only on my dev-machine, but Fleximage is not loading default images properly.

When fleximage tries to load the image in Model.load_image it doesn't check that if it exists. Rather it tries to load the image with Magick::Image.read, which in turn throws an exception when the file is not found.

Unfortunately that doesn't work anymore for me. Fleximage expects that exception contains string "unable to open (file|image)", but in my environment RMagick always throws exception "no decode delegate for this image format". Because of that, the fleximage fails and exception is raised.

I'm using ImageMagick 6.6.3, RMagick 2.12.2, Rails 2.3.5 with REE 2010.02

Migrate from legacy system to fleximage via image urls

Hi,
is it possible to migrate from a legacy system to fleximage by importing all images via full urls to the images?

Actually I thought about putting the full url of the image into the image_filename column of my users table and that Fleximage would render that image also remotly...maybe fetching the image on the first hit.

Or is there maybe a rake task for this?

What process would you suggest for applications where you don't start from scatch and already have a bunch of images for your model object?

Thanks
Christoph

More than one size image output in same file type (e.g. image is available as both 111.jpg and thumb111.jpg)

Hello everyone, I'm having trouble getting my head around having both an image and thumbnail on the same page, using the same file type.
EG if my image object id is 111,
I can display 111.jpg at a given size using the .jpg.flexi template
I can display 111.png at a different size using the .png.flexi template
OK so far.
What I'd like is to both thumbnail and full image as .jpg.
Before fleximage, I'd have taken an image and generated multiple versions like 111.jpg and thumb111.jpg, I just can't see how to solve that need using fleximage.

If anyone can put me on the right track I'd appreciate it.
Thanks,
Steve

JPEG mime registration generates warning when used as a gem

When using fleximage as a gem a warning is generated by the registration of the image/jpeg mime type and its alias image/pjpeg. I think this warning is also generated when installed as a plugin but its swallowed during the initial plugin loading. Also looking at the code for register_alias it's the wrong method - it should be registered as a mime type synonym. My fault since I added it in the first place.

Anyway a fix for this can be found in this commit.

Running Fleximage on Ruby 1.9, got error

The error was something like:

-- C level backtrace information -------------------------------------------
0x10010cd8d 0 libruby.dylib 0x000000010010cd8d rb_vm_bugreport + 77
0x10002b184 1 libruby.dylib 0x000000010002b184 report_bug + 260
0x10002b318 2 libruby.dylib 0x000000010002b318 rb_bug + 200
0x1000b7124 3 libruby.dylib 0x00000001000b7124 sigsegv + 132
0x7fff8151514a 4 libSystem.B.dylib 0x00007fff8151514a _sigtramp + 26
0x5 5 ??? 0x0000000000000005 0x0 + 5
0x103abcaf5 6 libMagickCore.2.dylib 0x0000000103abcaf5 AcquirePixelCache + 309
0x103b664e6 7 libMagickCore.2.dylib 0x0000000103b664e6 AcquireImage + 358
0x103b66fc2 8 libMagickCore.2.dylib 0x0000000103b66fc2 SetImageInfo + 466
0x103ae5ccd 9 libMagickCore.2.dylib 0x0000000103ae5ccd ReadImage + 173
0x101f957ff 10 RMagick2.bundle 0x0000000101f957ff rd_image + 339
0x101f9566f 11 RMagick2.bundle 0x0000000101f9566f Image_read + 36

Any idea what could be wrong? I am using RVM (Ruby Version Manager http://rvm.beginrescueend.com/) and the one on Ruby version 1.8.7 works nicely.

Thanks for such awesome gem!

autotest not finding aws/s3 gem

rake test runs tests fine, but autotest complains of this

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -rrubygems -e "require 'redgreen'" -I.:lib:test -rubygems -e "['test/unit', 'test/functional/menuitems_controller_test.rb', 'test/unit/itemcategory_test.rb', 'test/functional/itemcategory_controller_test.rb', 'test/functional/cities_controller_test.rb', 'test/functional/categories_controller_test.rb', 'test/unit/user_test.rb', 'test/unit/helpers/home_helper_test.rb', 'test/functional/sessions_controller_test.rb', 'test/unit/menuitem_test.rb', 'test/unit/helpers/localities_helper_test.rb', 'test/functional/home_controller_test.rb', 'test/unit/helpers/itemcategory_helper_test.rb', 'test/unit/helpers/photos_helper_test.rb', 'test/unit/helpers/categories_helper_test.rb', 'test/unit/venue_test.rb', 'test/unit/helpers/hoods_helper_test.rb', 'test/unit/helpers/venues_helper_test.rb', 'test/functional/users_controller_test.rb', 'test/unit/user_mailer_test.rb', 'test/unit/helpers/menuitems_helper_test.rb', 'test/functional/pages_controller_test.rb', 'test/functional/hoods_controller_test.rb', 'test/unit/city_test.rb', 'test/functional/photos_controller_test.rb', 'test/unit/review_test.rb', 'test/unit/category_test.rb', 'test/unit/hood_test.rb', 'test/functional/localities_controller_test.rb', 'test/unit/locality_test.rb', 'test/unit/page_test.rb', 'test/unit/helpers/reviews_helper_test.rb', 'test/functional/venues_controller_test.rb', 'test/unit/helpers/cities_helper_test.rb', 'test/unit/helpers/pages_helper_test.rb', 'test/functional/reviews_controller_test.rb', 'test/unit/photo_test.rb'].each { |f| require f }" | /Library/Ruby/Gems/1.8/gems/autotest-4.2.9/bin/unit_diff -u
/Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require': no such file to load -- aws/s3 (MissingSourceFile) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in require' from /Users/jerome/Sites/happyhour/vendor/plugins/fleximage/lib/fleximage.rb:4 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:ingem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:inrequire'
from /Users/jerome/Sites/happyhour/vendor/plugins/fleximage/init.rb:1:in evaluate_init_rb' from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:158:inevaluate_init_rb'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb:11:in silence_warnings' from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:154:inevaluate_init_rb'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:48:in load' from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:38:inload_plugins'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in each' from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:inload_plugins'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:369:in load_plugins' from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:165:inprocess'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in send' from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:inrun'
from /Users/jerome/Sites/happyhour/config/environment.rb:9
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire'
from ./test/test_helper.rb:2
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire'
from ./test/functional/menuitems_controller_test.rb:1
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire'
from -e:2
from -e:2:in `each'
from -e:2

has_key? issue

Running Rails 2.3.4 and when trying to display an image using

<%= image_tag pictures_path(@picture, :jpg) %>

Getting this error
undefined method `has_key?' for :jpg:Symbol

I can browse to localhost:3000/pictures/8.jpg and the image will show just fine, but not if I try to do it the other way.

Any ideas or help would be appreciated

Problem using fleximage under Snow Leopard

hi,
I upgrade my os to mac ox 10.6 and reinstalled the ImageMagick and RMagick.

I got these exceptions and don't know how to handle:
=> Booting WEBrick
=> Rails 2.3.3 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2009-09-01 23:48:28] INFO WEBrick 1.3.1
[2009-09-01 23:48:28] INFO ruby 1.9.1 (2009-07-16) [i386-darwin10.0.0]
[2009-09-01 23:48:28] INFO WEBrick::HTTPServer#start: pid=45497 port=3000
/Users/arkxu/rprojects/htmless/vendor/plugins/fleximage/lib/fleximage/model.rb:296: [BUG] Segmentation fault
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin10.0.0]

-- control frame ----------
c:0058 p:---- s:0285 b:0285 l:000284 d:000284 CFUNC :read
c:0057 p:0058 s:0281 b:0281 l:000280 d:000280 METHOD /Users/arkxu/rprojects/htmless/vendor/plugins/fleximage/lib/fleximage/model.rb:296
c:0056 p:0084 s:0275 b:0275 l:000265 d:000274 BLOCK /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/base.rb:2740
c:0055 p:---- s:0271 b:0271 l:000270 d:000270 FINISH
c:0054 p:---- s:0269 b:0269 l:000268 d:000268 CFUNC :each
c:0053 p:0078 s:0266 b:0266 l:000265 d:000265 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/base.rb:2736
c:0052 p:0059 s:0259 b:0259 l:000258 d:000258 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/base.rb:2434
c:0051 p:---- s:0254 b:0254 l:000253 d:000253 FINISH
c:0050 p:---- s:0252 b:0252 l:000251 d:000251 CFUNC :new
c:0049 p:0107 s:0248 b:0248 l:000247 d:000247 METHOD /Users/arkxu/rprojects/htmless/app/controllers/p_pic_disp_items_controller.rb:61
c:0048 p:0042 s:0245 b:0245 l:000244 d:000244 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/base.rb:1327
c:0047 p:0047 s:0241 b:0241 l:000240 d:000240 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/filters.rb:617
c:0046 p:0028 s:0234 b:0234 l:000233 d:000233 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/filters.rb:610
c:0045 p:0009 s:0231 b:0231 l:000f78 d:000230 BLOCK /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/benchmarking.rb:68
c:0044 p:0005 s:0229 b:0229 l:0011d8 d:000228 BLOCK /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.3/lib/active_support/core_ext/benchmark.rb:17
c:0043 p:0024 s:0227 b:0227 l:000226 d:000226 METHOD /usr/local/ruby/lib/ruby/1.9.1/benchmark.rb:309
c:0042 p:0013 s:0221 b:0220 l:0011d8 d:0011d8 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.3/lib/active_support/core_ext/benchmark.rb:17
c:0041 p:0028 s:0217 b:0217 l:000f78 d:000f78 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/benchmarking.rb:68
c:0040 p:0011 s:0210 b:0210 l:000209 d:000209 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/rescue.rb:160
c:0039 p:0011 s:0206 b:0206 l:000205 d:000205 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/flash.rb:146
c:0038 p:0088 s:0203 b:0203 l:000202 d:000202 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/base.rb:527
c:0037 p:0029 s:0196 b:0196 l:000195 d:000195 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/filters.rb:606
c:0036 p:0021 s:0189 b:0189 l:000188 d:000188 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/base.rb:391
c:0035 p:0097 s:0184 b:0184 l:000183 d:000183 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/base.rb:386
c:0034 p:0054 s:0178 b:0178 l:000177 d:000177 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/routing/route_set.rb:434
c:0033 p:0035 s:0172 b:0172 l:000171 d:000171 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/dispatcher.rb:88
c:0032 p:0017 s:0167 b:0167 l:000166 d:000166 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/dispatcher.rb:111
c:0031 p:0018 s:0163 b:0163 l:001b10 d:000162 LAMBDA /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/dispatcher.rb:82
c:0030 p:---- s:0160 b:0160 l:000159 d:000159 FINISH
c:0029 p:---- s:0158 b:0158 l:000157 d:000157 CFUNC :call
c:0028 p:0014 s:0154 b:0154 l:000153 d:000153 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/head.rb:9
c:0027 p:0150 s:0147 b:0147 l:000146 d:000146 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/methodoverride.rb:24
c:0026 p:0045 s:0141 b:0141 l:000140 d:000140 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/params_parser.rb:15
c:0025 p:0080 s:0136 b:0136 l:000135 d:000135 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/session/abstract_store.rb:122
c:0024 p:0013 s:0124 b:0124 l:000190 d:000123 BLOCK /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/query_cache.rb:29
c:0023 p:0038 s:0122 b:0122 l:000121 d:000121 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/connection_adapters/abstract/query_cache.rb:34
c:0022 p:0051 s:0118 b:0118 l:000117 d:000117 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/query_cache.rb:9
c:0021 p:0019 s:0114 b:0114 l:000190 d:000190 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/query_cache.rb:28
c:0020 p:0014 s:0110 b:0110 l:000109 d:000109 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:3
c:0019 p:0030 s:0106 b:0106 l:000105 d:000105 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/reloader.rb:29
c:0018 p:0014 s:0099 b:0099 l:000098 d:000098 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/failsafe.rb:26
c:0017 p:0013 s:0094 b:0094 l:000088 d:000093 BLOCK /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/lock.rb:11
c:0016 p:0019 s:0092 b:0092 l:000091 d:000091 METHOD internal:prelude:8
c:0015 p:0052 s:0089 b:0089 l:000088 d:000088 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/lock.rb:11
c:0014 p:0014 s:0084 b:0084 l:000083 d:000083 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/dispatcher.rb:106
c:0013 p:0185 s:0080 b:0080 l:000079 d:000079 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.3/lib/rails/rack/static.rb:31
c:0012 p:0195 s:0073 b:0073 l:000062 d:000072 BLOCK /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/urlmap.rb:46
c:0011 p:---- s:0068 b:0068 l:000067 d:000067 FINISH
c:0010 p:---- s:0066 b:0066 l:000065 d:000065 CFUNC :each
c:0009 p:0069 s:0063 b:0063 l:000062 d:000062 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/urlmap.rb:40
c:0008 p:0014 s:0054 b:0054 l:000053 d:000053 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.3/lib/rails/rack/log_tailer.rb:17
c:0007 p:0014 s:0049 b:0049 l:000048 d:000048 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/content_length.rb:13
c:0006 p:0303 s:0041 b:0041 l:000040 d:000040 METHOD /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler/webrick.rb:46
c:0005 p:0256 s:0030 b:0030 l:000029 d:000029 METHOD /usr/local/ruby/lib/ruby/1.9.1/webrick/httpserver.rb:111
c:0004 p:0382 s:0020 b:0020 l:000019 d:000019 METHOD /usr/local/ruby/lib/ruby/1.9.1/webrick/httpserver.rb:70
c:0003 p:0123 s:0009 b:0009 l:0001d8 d:000008 BLOCK /usr/local/ruby/lib/ruby/1.9.1/webrick/server.rb:183
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH

c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP

-- Ruby level backtrace information-----------------------------------------
/Users/arkxu/rprojects/htmless/vendor/plugins/fleximage/lib/fleximage/model.rb:296:in read' /Users/arkxu/rprojects/htmless/vendor/plugins/fleximage/lib/fleximage/model.rb:296:inimage_file='
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/base.rb:2740:in block in attributes=' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/base.rb:2736:ineach'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/base.rb:2736:in attributes=' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/base.rb:2434:ininitialize'
/Users/arkxu/rprojects/htmless/app/controllers/p_pic_disp_items_controller.rb:61:in new' /Users/arkxu/rprojects/htmless/app/controllers/p_pic_disp_items_controller.rb:61:increate'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/base.rb:1327:in perform_action' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/filters.rb:617:incall_filters'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/filters.rb:610:in perform_action_with_filters' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/benchmarking.rb:68:inblock in perform_action_with_benchmark'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.3/lib/active_support/core_ext/benchmark.rb:17:in block in ms' /usr/local/ruby/lib/ruby/1.9.1/benchmark.rb:309:inrealtime'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.3/lib/active_support/core_ext/benchmark.rb:17:in ms' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/benchmarking.rb:68:inperform_action_with_benchmark'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/rescue.rb:160:in perform_action_with_rescue' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/flash.rb:146:inperform_action_with_flash'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/base.rb:527:in process' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/filters.rb:606:inprocess_with_filters'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/base.rb:391:in process' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/base.rb:386:incall'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/routing/route_set.rb:434:in call' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/dispatcher.rb:88:indispatch'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/dispatcher.rb:111:in _call' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/dispatcher.rb:82:inblock in initialize'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/head.rb:9:in call' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/head.rb:9:incall'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in call' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/params_parser.rb:15:incall'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/session/abstract_store.rb:122:in call' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/query_cache.rb:29:inblock in call'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in cache' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/query_cache.rb:9:incache'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/query_cache.rb:28:in call' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:incall'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/reloader.rb:29:in call' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/failsafe.rb:26:incall'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/lock.rb:11:in block in call' <internal:prelude>:8:insynchronize'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/lock.rb:11:in call' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/actionpack-2.3.3/lib/action_controller/dispatcher.rb:106:incall'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.3/lib/rails/rack/static.rb:31:in call' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/urlmap.rb:46:inblock in call'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in each' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/urlmap.rb:40:incall'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.3/lib/rails/rack/log_tailer.rb:17:in call' /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/content_length.rb:13:incall'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler/webrick.rb:46:in service' /usr/local/ruby/lib/ruby/1.9.1/webrick/httpserver.rb:111:inservice'
/usr/local/ruby/lib/ruby/1.9.1/webrick/httpserver.rb:70:in run' /usr/local/ruby/lib/ruby/1.9.1/webrick/server.rb:183:inblock in start_thread'

-- C level backtrace information -------------------------------------------
0x10010866d 0 ruby 0x000000010010866d rb_vm_bugreport + 77
0x100027d64 1 ruby 0x0000000100027d64 report_bug + 260
0x100027ef8 2 ruby 0x0000000100027ef8 rb_bug + 200
0x1000b3664 3 ruby 0x00000001000b3664 sigsegv + 132
0x7fff87ffd14a 4 libSystem.B.dylib 0x00007fff87ffd14a _sigtramp + 26
0x0 5 ??? 0x0000000000000000 0x0 + 0
0x103815f85 6 libMagickCore.2.dylib 0x0000000103815f85 AcquirePixelCache + 293
0x1038bdc06 7 libMagickCore.2.dylib 0x00000001038bdc06 AcquireImage + 358
0x1038be6e2 8 libMagickCore.2.dylib 0x00000001038be6e2 SetImageInfo + 466
0x10383e58d 9 libMagickCore.2.dylib 0x000000010383e58d ReadImage + 173
0x101f83e9b 10 RMagick2.bundle 0x0000000101f83e9b rd_image + 339
0x101f83d0b 11 RMagick2.bundle 0x0000000101f83d0b Image_read + 36
0x1000f8bd1 12 ruby 0x00000001000f8bd1 vm_call_cfunc + 337
0x1000fa480 13 ruby 0x00000001000fa480 vm_call_method + 896
0x1000fb3bc 14 ruby 0x00000001000fb3bc vm_exec_core + 3164
0x1001005ce 15 ruby 0x00000001001005ce vm_exec + 1102
0x1001063b9 16 ruby 0x00000001001063b9 rb_yield + 505
0x10003c857 17 ruby 0x000000010003c857 each_pair_i + 23
0x10003d0d8 18 ruby 0x000000010003d0d8 hash_foreach_iter + 40
0x1000baaaa 19 ruby 0x00000001000baaaa st_foreach + 218
0x10003eefa 20 ruby 0x000000010003eefa hash_foreach_call + 26
0x10002980f 21 ruby 0x000000010002980f rb_ensure + 127
0x10003e2f8 22 ruby 0x000000010003e2f8 rb_hash_foreach + 56
0x10003e8c1 23 ruby 0x000000010003e8c1 rb_hash_each_pair + 81
0x1000f8bd1 24 ruby 0x00000001000f8bd1 vm_call_cfunc + 337
0x1000fa480 25 ruby 0x00000001000fa480 vm_call_method + 896
0x1000fb3bc 26 ruby 0x00000001000fb3bc vm_exec_core + 3164
0x1001005ce 27 ruby 0x00000001001005ce vm_exec + 1102
0x1001024cd 28 ruby 0x00000001001024cd vm_call0 + 621
0x1000f9d78 29 ruby 0x00000001000f9d78 rb_funcall2 + 296
0x10005aba3 30 ruby 0x000000010005aba3 rb_class_new_instance + 51
0x1000f8bd1 31 ruby 0x00000001000f8bd1 vm_call_cfunc + 337
0x1000fa480 32 ruby 0x00000001000fa480 vm_call_method + 896
0x1000fb3bc 33 ruby 0x00000001000fb3bc vm_exec_core + 3164
0x1001005ce 34 ruby 0x00000001001005ce vm_exec + 1102
0x100102013 35 ruby 0x0000000100102013 rb_vm_invoke_proc + 691
0x1000f8bd1 36 ruby 0x00000001000f8bd1 vm_call_cfunc + 337
0x1000fa480 37 ruby 0x00000001000fa480 vm_call_method + 896
0x1000fb3bc 38 ruby 0x00000001000fb3bc vm_exec_core + 3164
0x1001005ce 39 ruby 0x00000001001005ce vm_exec + 1102
0x1001063b9 40 ruby 0x00000001001063b9 rb_yield + 505
0x100004582 41 ruby 0x0000000100004582 rb_ary_each + 82
0x1000f8bd1 42 ruby 0x00000001000f8bd1 vm_call_cfunc + 337
0x1000fa480 43 ruby 0x00000001000fa480 vm_call_method + 896
0x1000fb3bc 44 ruby 0x00000001000fb3bc vm_exec_core + 3164
0x1001005ce 45 ruby 0x00000001001005ce vm_exec + 1102
0x100102013 46 ruby 0x0000000100102013 rb_vm_invoke_proc + 691
0x10010d063 47 ruby 0x000000010010d063 thread_start_func_2 + 835
0x10010d181 48 ruby 0x000000010010d181 thread_start_func_1 + 17
0x7fff87fd606e 49 libSystem.B.dylib 0x00007fff87fd606e _pthread_start + 331
0x7fff87fd5f21 50 libSystem.B.dylib 0x00007fff87fd5f21 thread_start + 13

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Abort trap

image_file_url = nil breaks

To allow:
image_file_url = nil

line 395 of model.rb should be

elsif file_url.blank?

not:

elsif file_url.empty?

No support for Rails 3.2

I've been using fleximage in an app since 2 years and it works like a charm in Rauls 2.2.2. Now I might be forced to go to Rails 3.2 but unfortunately the fixes made by Giovanelli for 3.1 are not sufficient for 3.2.

I'm getting an error
vendor/plugins/fleximage/lib/fleximage/view.rb:4: uninitialized constant ActionView::TemplateHandler (NameError
on initialisation.
which I'm not able to deal with.
Are there plans to adapt fleximage to Rails 3.2 or should I look for a fleximage replacement?
Has anyone used fleximage with a current Rails version?

Can't render Image

Hello,

i just installed fleximage and i was able to upload the images to my directory. but there ist a problem:

i can display the images.

i got this error:

NoMethodError in Pictures#mini

Showing /media/psf/rails/mobile_designer/app/views/pictures/mini.png.flexi where line #1 raised:

undefined method `template' for #PicturesController:0x7f4c5014f0c0

i an using rails 3.0.9

Alpha channel being ignored in custom operator

I am seeing this issue on both Windows 7 and Ubuntu:

Here is my custom operator.

class Fleximage::Operator::Snap < Fleximage::Operator::Base
   def operate(caption = nil)
   photo_frame = Magick::Image.read("public/images/frames/snap_master2.png")[0]
    @image = @image.resize_to_fill(150, 180)

    @image = photo_frame.composite(@image, 17, 17, Magick::OverCompositeOp)
  end
end

When this is executed any alpha in "public/images/frames/snap_master2.png" is rendered in black. I have tried to recreate the image in several ways with similar results.

[PATCH] image_directory doesn't prepend RAILS_ROOT to an absolute path

image_directory always prepends RAILS_ROOT to passed path.
It forces that image directory should be under RAILS_ROOT.

But there are some cases to save images outside RAILS_ROOT.
For example, capistrano deployment case is one of the cases. Capistrano deploys an application to /.../releases/20XXXXXX/ and create symbolic links to /.../current/. Deployed applications, /.../releases/20XXXXXX/*, should share its image directory outsize its RAILS_ROOT. (e.g. /.../shares/images/)

In the case, we want to use absolute path not relative path from RAILS_ROOT for image directory.

I have a solution that image_directory doesn't prepend RAILS_ROOT for passed path that is absolute path.
Here is a patch:
http://github.com/kou/fleximage/commit/a73bf4640bab20e9e894bbebaf33fa76b1843707

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.