Free Support Forum - aspose.cloud

LoadError: cannot load such file -- aspose_storage_cloud

Using 1.0.3 version of aspose_storage_cloud based on the README example throws

LoadError: cannot load such file -- aspose_storage_cloud

Gemfile

# frozen_string_literal: true

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

gem 'aspose_storage_cloud', '1.0.3'

storage.rb

require 'aspose_storage_cloud'

class Storage

  include AsposeStorageCloud
  
  def initialize
    #Get App key and App SID from https://cloud.aspose.com
    AsposeApp.app_key_and_sid("APP_KEY", "APP_SID")
    @storage_api = StorageApi.new  
  end
  
  def get_aspose_disc_usage
    #Check the disk usage of the current account.
    disc_usage_response = @storage_api.get_disc_usage()
    puts "Used Size: #{disc_usage_response.disc_usage.used_size} Total Size: #{disc_usage_response.disc_usage.total_size}"
  end
  
end

@beverlyguillermo

Thanks for contacting Aspose Support.

Installing aspose_storage_cloud version 1.0.0 would fix this error. Please type the following command in your terminal.

gem install aspose_storage_cloud -v 1.0.0

Please contact us if there are any problems.