You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by Mark McLoughlin <ma...@redhat.com> on 2011/08/18 10:51:49 UTC

[PATCH 1/3] Client: don't require lib/base_object

client/lib/deltacloud.rb was recently changed to require 'lib/base_object'
rather than 'base_object' which results in:

  $ irb -rubygems
  irb(main):001:0> require 'deltacloud'
  LoadError: no such file to load -- lib/base_object
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/gems/1.8/gems/deltacloud-client-0.4.0/lib/deltacloud.rb:26
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `gem_original_require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `require'
    from (irb):1

When you load a gem, 'lib' is automatically included in the load path.
---
 client/lib/deltacloud.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/client/lib/deltacloud.rb b/client/lib/deltacloud.rb
index 258a48f..782f926 100644
--- a/client/lib/deltacloud.rb
+++ b/client/lib/deltacloud.rb
@@ -23,7 +23,7 @@ require 'logger'
 require 'hwp_properties'
 require 'instance_state'
 require 'documentation'
-require 'lib/base_object'
+require 'base_object'
 require 'client_bucket_methods'
 
 module DeltaCloud
-- 
1.7.4.4


Re: [PATCH 1/3] Client: don't require lib/base_object

Posted by Michal Fojtik <mf...@redhat.com>.
On Aug 18, 2011, at 10:51 AM, Mark McLoughlin wrote:

> client/lib/deltacloud.rb was recently changed to require 'lib/base_object'
> rather than 'base_object' which results in:
> 
>  $ irb -rubygems
>  irb(main):001:0> require 'deltacloud'
>  LoadError: no such file to load -- lib/base_object
>    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
>    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
>    from /usr/lib/ruby/gems/1.8/gems/deltacloud-client-0.4.0/lib/deltacloud.rb:26
>    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `gem_original_require'
>    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `require'
>    from (irb):1
> 
> When you load a gem, 'lib' is automatically included in the load path.

Good catch Mark! I added this there probably during testing client.

ACK.

  -- Michal


> ---
> client/lib/deltacloud.rb |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/client/lib/deltacloud.rb b/client/lib/deltacloud.rb
> index 258a48f..782f926 100644
> --- a/client/lib/deltacloud.rb
> +++ b/client/lib/deltacloud.rb
> @@ -23,7 +23,7 @@ require 'logger'
> require 'hwp_properties'
> require 'instance_state'
> require 'documentation'
> -require 'lib/base_object'
> +require 'base_object'
> require 'client_bucket_methods'
> 
> module DeltaCloud
> -- 
> 1.7.4.4
> 

------------------------------------------------------
Michal Fojtik, mfojtik@redhat.com
Deltacloud API: http://deltacloud.org