How can I delete specific jobs from Resque queue without clearing the whole queue?

In resque’s sources (Job class) there’s such method, guess it’s what you need 🙂 # Removes a job from a queue. Expects a string queue name, a # string class name, and, optionally, args. # # Returns the number of jobs destroyed. # # If no args are provided, it will remove all jobs of … Read more

Seeding file uploads with CarrierWave, Rails 3

Turns out the documentation for CarrierWave is slightly wrong. There is a more up to date piece of code in the README at the GitHub repository for the project. In a nutshell, though: pi = ProductImage.create!(:product => product) pi.image.store!(File.open(File.join(Rails.root, ‘test.jpg’))) product.product_images << pi product.save!

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)