Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librarian-puppet 0.9.12 on CentOS 6.5 - `gem_original_require': no such file to load -- open3_backport (LoadError) #179

Closed
TJM opened this issue Feb 11, 2014 · 5 comments

Comments

@TJM
Copy link

TJM commented Feb 11, 2014

I am getting a ruby error about open3_backport when running the latest librarian-puppet on CentOS 6.5 fully up to date, native ruby 1.8.7....

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- open3_backport (LoadError)
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.12/lib/librarian/puppet.rb:13
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.12/lib/librarian/puppet/cli.rb:4
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/librarian-puppet-0.9.12/bin/librarian-puppet:6
    from /usr/bin/librarian-puppet:19:in `load'
    from /usr/bin/librarian-puppet:19

We have noticed that it works fine if I use gem install librarian-puppet -v 0.9.11, but the only differences between 0.9.11 and 0.9.12 appear to be comments and the version tag itself: v0.9.11...v0.9.12 .

If I just use gem install librarian-puppet or gem install librarian-puppet -v 0.9.12 it seems to install v0.9.12....

[root@epph-app ~]# gem list

*** LOCAL GEMS ***

highline (1.6.20)
json (1.5.5)
librarian (0.1.2)
librarian-puppet (0.9.12)
open3_backport (0.0.3)
open4 (1.3.0)
thor (0.18.1)

... but I get the error above. My assumption is that by default it is somehow installing from the master branch on github directly. I think that perhaps the release for 0.9.12 is accidentally pointing to master instead of 0.9.12 tag. There are differences between 0.9.12 and master v0.9.12...master .. which might account for this error that we are seeing when trying to run librarian-puppet install --clean

Thanks,
Tommy

PS: EDITED for clarity :)

@TJM
Copy link
Author

TJM commented Feb 11, 2014

When installing 0.9.11 explicitly, everything works, and this is the gem list:

[vagrant@epph-app ~]$ gem list

*** LOCAL GEMS ***

highline (1.6.20)
json (1.5.5)
librarian (0.1.2)
librarian-puppet (0.9.11)
open3_backport (0.0.3)
open4 (1.3.0)
thor (0.18.1)

... as we originally thought it had something to do with librarian 0.1.2, I thought it would be good to include this, which indicates that it is using librarian 0.1.2, even in librarian-puppet 0.9.11. This is likely due to the '>=' on https://github.com/rodjek/librarian-puppet/blob/v0.9.11/librarian-puppet.gemspec#L26

@TJM
Copy link
Author

TJM commented Feb 11, 2014

Hmm, ok this is likely #167

As I also noticed that if I do it all manually (as opposed to running a shell script that installs and runs librarian-puppet), the open* gems are not installed. So, apparently they are installed at runtime?

# gem list

*** LOCAL GEMS ***

highline (1.6.20)
json (1.5.5)
librarian (0.1.2)
librarian-puppet (0.9.12)
thor (0.18.1)
[root@epph-sftp ~

@TJM
Copy link
Author

TJM commented Feb 11, 2014

If I install version 0.9.11, I get the necessary dependencies:

[root@epph-sftp ~]# gem list

*** LOCAL GEMS ***

json (1.5.5)
[root@epph-sftp ~]# gem install -V librarian-puppet -v 0.9.11 > /vagrant/web/librarian-puppet/install-0.9.11.txt
Could not find main page README
Could not find main page README
Could not find main page README
Could not find main page README
[root@epph-sftp ~]# gem list

*** LOCAL GEMS ***

highline (1.6.20)
json (1.5.5)
librarian (0.1.2)
librarian-puppet (0.9.11)
open3_backport (0.0.3)
open4 (1.3.0)
thor (0.18.1)

The difference is apparently how the gem was packaged, because the difference is not in the source code, its in the SPEC file that is created:

[root@epph-sftp specifications]# diff librarian-puppet-0.9.1*
5c5
<   s.version = "0.9.11"
---
>   s.version = "0.9.12"
29,30d28
<       s.add_runtime_dependency(%q<json>, [">= 0"])
<       s.add_runtime_dependency(%q<open3_backport>, [">= 0"])
40,41d37
<       s.add_dependency(%q<json>, [">= 0"])
<       s.add_dependency(%q<open3_backport>, [">= 0"])
52,53d47
<     s.add_dependency(%q<json>, [">= 0"])
<     s.add_dependency(%q<open3_backport>, [">= 0"])

Hmm, there's our little friend, open3_backport :)

Easy Workaround:

add gem install open3_backport to your script before attempting to run librarian-puppet, or just run librarian-puppet twice, as it does appear install its dependency at runtime (assuming you have permission to do so), so subsequent runs will work.

~tommy

@TJM
Copy link
Author

TJM commented Feb 11, 2014

oops, this is likely a duplicate of: #175

@carlossg
Copy link
Collaborator

Fixed, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants