Assuming you're using ActiveRecord, you can achieve this by finding all products and removing products in the issue. That would normally result in an array, so in the code below, I did one additional database query to have it return a scoped result so you can cascade other "where" clauses to the result.
class Product < ActiveRecord::Base
has_many :listings
scope :not_listed_in, lambda { |issue|
id_list = Product.pluck(:id) - issue.products.pluck(:id)
Product.where(id:id_list)
}
end
class Listing < ActiveRecord::Base
belongs_to :product
belongs_to :issue
end
class Issue < ActiveRecord::Base
has_many :listings
has_many :products, through: :listings
end