Today I had very strange problem with paperclip. Application worked fine for image upload. I set it up with passenger and suddenly I noticed an error while uploading. Something like ".../tmp/stream..... is not recognized by the 'identify' command" in my flash[:error]. After some investigations it turned out that everything works with mongrel but not with passenger. Problem is solved by adding /config/initializers/paperclip-passenger-fix.rb with just one line:
Paperclip.options[:image_magick_path] = '/usr/local/bin' # or whereever your imagemagick is ( find out with 'which identify' in your terminal
Monday, November 9, 2009
Tuesday, November 3, 2009
Helpers in Rails Engines
One more info for using Rails Engines. Helpers are not included automatically. You need to place
config.to_prepare do
ApplicationController.helper(MyEngineHelper)
end
in init.rb of your plugin
config.to_prepare do
ApplicationController.helper(MyEngineHelper)
end
in init.rb of your plugin
Friday, October 16, 2009
Rails 2.3.* Engines 'A copy of ApplicationController has been removed from the module tree but is still active!' problem
If you use Rails engines and get 'A copy of ApplicationController has been removed from the module tree but is still active!' error as I did, put unloadable in your plugin controllers:
class MyPluginController < ApplicationController
unloadable
#your code here
end
Thanks Dimo
class MyPluginController < ApplicationController
unloadable
#your code here
end
Thanks Dimo
Subscribe to:
Posts (Atom)