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

dpl 1.9.0 s3 LoadError #769

Closed
giannoudak opened this issue Mar 9, 2018 · 4 comments
Closed

dpl 1.9.0 s3 LoadError #769

giannoudak opened this issue Mar 9, 2018 · 4 comments

Comments

@giannoudak
Copy link

Hello,

After your latest release, our deploy stage we have in gitlab breaks deploying to s3. However yesterday ,earlier before your release, when tryed to deploy with 1.8.47 version we had no issues.
Here is our out output:

Downloading artifacts for build-job (1697)...
Downloading artifacts from coordinator... ok        id=1697 responseStatus=200 OK token=3u97oi_M
$ sudo apt-get install -yqq ruby ruby-dev
$ sudo gem install dpl
Successfully installed dpl-1.9.0
Parsing documentation for dpl-1.9.0
Installing ri documentation for dpl-1.9.0
Done installing documentation for dpl after 0 seconds
1 gem installed
$ sudo dpl --skip_cleanup --provider=s3 --region=eu-central-1 --access-key-id=$AWS_ACCESS_KEY --secret-access-key=$AWS_SECRET_KEY --bucket=$AWS_BUCKET --local-dir=dist/ --upload-dir=$AWS_UPLOAD_DIR/libs --acl=public_read --detect-encoding --cache_control=max-age=86400
Installing deploy dependencies
Successfully installed dpl-s3-1.9.0
Parsing documentation for dpl-s3-1.9.0
Installing ri documentation for dpl-s3-1.9.0
Done installing documentation for dpl-s3 after 0 seconds
1 gem installed
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require': cannot load such file -- dpl/provider/s3 (LoadError)
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
	from /var/lib/gems/2.3.0/gems/dpl-1.9.0/lib/dpl/provider.rb:92:in `rescue in block in new'
	from /var/lib/gems/2.3.0/gems/dpl-1.9.0/lib/dpl/provider.rb:67:in `block in new'
	from /var/lib/gems/2.3.0/gems/dpl-1.9.0/lib/dpl/cli.rb:41:in `fold'
	from /var/lib/gems/2.3.0/gems/dpl-1.9.0/lib/dpl/provider.rb:66:in `new'
	from /var/lib/gems/2.3.0/gems/dpl-1.9.0/lib/dpl/cli.rb:31:in `run'
	from /var/lib/gems/2.3.0/gems/dpl-1.9.0/lib/dpl/cli.rb:7:in `run'
	from /var/lib/gems/2.3.0/gems/dpl-1.9.0/bin/dpl:5:in `<top (required)>'
	from /usr/local/bin/dpl:23:in `load'
	from /usr/local/bin/dpl:23:in `<main>'

Do you have any fixes on this? or any suggestion to solve it?

@BanzaiMan
Copy link
Contributor

I think the issue here is that we are installing the provider gem with gem install …, and your invocation with sudo is not finding the provider code. Why are you running dpl with sudo?

@BanzaiMan
Copy link
Contributor

A workaround would be to install the provider gem with sudo beforehand:

$ sudo gem install dpl dpl-s3
$ sudo dpl --provider=s3 …

@BanzaiMan
Copy link
Contributor

Ah, you are using gitlab.

@BanzaiMan
Copy link
Contributor

Install the same version of the deployment provider gem (in this case dpl-s3) as dpl with sudo gem install before you invoke sudo dpl ….

I don't know if we can overcome it. I'd probably just note in README and call it a day.

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