You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by "John B. Wyatt IV" <jb...@gmail.com> on 2013/04/25 05:44:14 UTC

Require error on usage example with deltacloud-1.3.3

Greetings,

I get this error from the example on the usage page.

....rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require': cannot load such file -- deltacloud (LoadError)
    from
.....rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
    from digitalocean.rb:4:in `<main>'

To install deltacloud I used
gem install deltacloud-client

I'm trying to learn how to use deltacloud to manage a Digital Ocean account.

Here's the source
#require 'rubygems'
require 'deltacloud'

# this intializes a mock server
api_url      = 'http://localhost:3001/api'
api_name     = 'mockuser'
api_password = 'mockpassword'

client = DeltaCloud.new( api_name, api_password, api_url )
-- 
John Wyatt

Re: Require error on usage example with deltacloud-1.3.3

Posted by Michal Fojtik <mf...@redhat.com>.
Hi John,


First thanks for trying Deltacloud API!

>> Here's the source
>> #require 'rubygems'
>> require 'deltacloud'
>>
>> # this intializes a mock server
>> api_url      = 'http://localhost:3001/api'
>> api_name     = 'mockuser'
>> api_password = 'mockpassword'
>>
>> client = DeltaCloud.new( api_name, api_password, api_url )

It seems you use the 'old' client (<1.1.3), I strongly recommend to 
switch to the current client, because it has a tons of bug fixes and in 
general is more stable and more tested than the old one.


$ gem install deltacloud-client --version=1.1.3
$ gem install deltacloud-core --version=1.1.3

With the new client your code will look very similar:

<snip>
   require_relative 'deltacloud/client'
   client = Deltacloud::Client(
     'http://localhost:3001/api',
     'API_KEY',
     'API_PASSWORD'
   )
   client.create_instance(image_id, opts...)
</snip>

The full documentation for the client lib is here:

http://rdoc.info/github/mifo/deltacloud-client/master/frames

To have DigitalOcean as a 'default' driver, you just need to start 
Deltacloud using:

$ deltacloudd -i digitalocean

Cheers,
   Michal

>> --
>> John Wyatt
>>
>   Hi John,
>
> Did you also install the server gem - deltacloud-core? for release 1.1.3?
> What does 'gem query |grep deltacloud' return?
>
> Please see the two gems shown for download:
> http://deltacloud.apache.org/download.html
>
> Also, if you are trying to connect to your Digital Ocean account, you will need to start a Deltacloud server like:
> deltacloudd -i digitalocean
>
> Then, (from a separate terminal on the same machine), try:
> client = DeltaCloud.new( <Digital Ocean Client key>, <Digital Ocean API Key>, 'http://localhost:3001/api' )
>
>  From there, you should be able to access vms, images etc. from your Digital Ocean accout.
>
> Thanks,
> Ronelle
>


-- 

Michal Fojtik <mf...@redhat.com>
Deltacloud API, CloudForms

Re: Require error on usage example with deltacloud-1.3.3

Posted by Ronelle Landy <rl...@redhat.com>.
> From: "John B. Wyatt IV" <jb...@gmail.com>
> To: dev@deltacloud.apache.org
> Sent: Wednesday, April 24, 2013 11:44:14 PM
> Subject: Require error on usage example with deltacloud-1.3.3
> 
> Greetings,
> 
> I get this error from the example on the usage page.
> 
> ....rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require': cannot load such file -- deltacloud (LoadError)
>     from
> .....rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require'
>     from digitalocean.rb:4:in `<main>'
> 
> To install deltacloud I used
> gem install deltacloud-client
> 
> I'm trying to learn how to use deltacloud to manage a Digital Ocean account.
> 
> Here's the source
> #require 'rubygems'
> require 'deltacloud'
> 
> # this intializes a mock server
> api_url      = 'http://localhost:3001/api'
> api_name     = 'mockuser'
> api_password = 'mockpassword'
> 
> client = DeltaCloud.new( api_name, api_password, api_url )
> --
> John Wyatt
> 
 Hi John,

Did you also install the server gem - deltacloud-core? for release 1.1.3?
What does 'gem query |grep deltacloud' return?

Please see the two gems shown for download:
http://deltacloud.apache.org/download.html

Also, if you are trying to connect to your Digital Ocean account, you will need to start a Deltacloud server like:
deltacloudd -i digitalocean

Then, (from a separate terminal on the same machine), try:
client = DeltaCloud.new( <Digital Ocean Client key>, <Digital Ocean API Key>, 'http://localhost:3001/api' )

>From there, you should be able to access vms, images etc. from your Digital Ocean accout.

Thanks,
Ronelle