So it seems I was missing a small piece and I had a few things in the wrong place.
First I needed to refresh the gems after installing the redis gem in my recipe which looks like this.
r = chef_gem "redis" do
action :nothing
end
r.run_action(:install)
Gem.clear_paths
I was also requiring the library in my Provider which was incorrect. I needed to require it in my recipe after Gem.clear_paths
then in my provider I would open the connection and preform add, delete, or update records which looks like this.
action :create do
if @current_resource.exists
Chef::Log.info "#{ @new_resource } already exist - nothing to do."
else
converge_by("Create #{ @new_resource }") do
create_app_key
end
end
end
def create_app_key
redis = ::Redis.new
redis.set "#{@new_resource.app_name}", "#{@new_resource.api_key}"
end