diff --git a/daemons/image_sucker.rb b/daemons/image_sucker.rb index 9c0f586..79ad542 100644 --- a/daemons/image_sucker.rb +++ b/daemons/image_sucker.rb @@ -1,10 +1,17 @@ -require 'rubygems' -require 'eventmachine' -require 'mongoid' -require 'carrierwave' +PADRINO_ENV = ENV["PADRINO_ENV"] ||= ENV["RACK_ENV"] ||= "development" unless defined?(PADRINO_ENV) +PADRINO_ROOT = File.expand_path('../..', __FILE__) unless defined?(PADRINO_ROOT) + +# Load our dependencies +require 'rubygems' unless defined?(Gem) +require 'bundler/setup' +Bundler.require(:default, PADRINO_ENV) + +# require 'eventmachine' +# require 'mongoid' +# require 'carrierwave' require 'carrierwave/orm/mongoid' -require 'fastimage' -require 'state_machine' +# require 'fastimage' +# require 'state_machine' # Connection.new takes host, port host = 'localhost' @@ -44,5 +51,5 @@ def download_images_for_feed_items end end + puts "image_sucker loaded" end -