Travis build fails: Ruby ruby-2.2.5 is not installed - ruby

My travis build suddenly started to fail with (between before_deploy and deploy):
Ruby ruby-2.2.5 is not installed.
The command "rvm 2.2.5 --fuzzy do ruby -S gem install dpl" failed and exited with 2 during .
Ideas how to fix this?
.travis.yaml
before_deploy:
- export PATH=$PATH:${CLOUD_SDK_PATH}/bin
- openssl aes-256-cbc -K $encrypted_c09a72752447_key -iv $encrypted_c09a72752447_iv -in contrib/gae/secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
deploy:
- provider: script
skip_cleanup: true
script: fab deploy:target='DEV',ci=True
on: develop

I just hit this too. As a workaround, you might be able to install ruby 2.2.5 explicitly, adding an install command to my before_install step works for me:
before_install:
- rvm install 2.2.5

Sorry, everyone. We had a bad deploy earlier today. This should be fixed now.

Related

Faraday::Connection without adapter has been made. CICD on Gitlab

everything was going well, before this morning, I'm totally new to cicd and things like that so I write this to deploy my app to heroku
`'API deploy':
stage: deploy back
image: ruby:latest
script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
- cd back
- dpl --provider=heroku --app=$HEROKU_BACK --api-key=$HEROKU_API_KEY --skip_cleanup
only:
refs:
- main
changes:
- back/**/*
- .gitlab-ci.yml`
And I receive this:
An attempt to run a request with a Faraday::Connection without adapter has been made. (RuntimeError)
Please set Faraday.default_adapter or provide one when initializing the connection.
I really don't know how to do it and whats going on as I say yesterday all was good.
Update: It's seems due to the current update Faraday-2.0.0
I faced the same problem today. Apparently there is some problem in the latest version of FARADAY, at the moment. I solved it this way: add manual installation of the previous version of the dependency to your .gitlab.yml, and everything will work. Have a nice day.
before_script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
- gem install faraday -v 1.8.0
I add the step below and it works fine
- gem install faraday -v 1.8.0

How to install a particular version of helm?

I am installing helm through a script which uses these commands to install the latest version -
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3.2.0
chmod 700 get_helm.sh
./get_helm.sh
however , i don't want it to install the latest versions always. how can i install the version v3.2.4 always?
You can find all the versions of helm binaries on Helm Releases page
If you want to install v3.2.4
$ wget https://get.helm.sh/helm-v3.2.4-linux-amd64.tar.gz
$ tar -zxvf helm-v3.2.4-linux-amd64.tar.gz
$ sudo mv linux-amd64/helm /usr/local/bin/helm
$ helm version
version.BuildInfo{Version:"v3.2.4", GitCommit:"0ad800ef43d3b826f31a5ad8dfbb4fe05d143688", GitTreeState:"clean", GoVersion:"go1.13.12"}
Documentation
It is possible to use the DESIRED_VERSION environment variable to specify the version (by github tag) that should be installed by the get_helm.sh script.
curl -fsSL -o get_helm.sh \
https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
DESIRED_VERSION=v3.2.4 ./get_helm.sh
helm version
console output:
Helm v3.2.4 is available. Changing from version v3.5.0.
Downloading https://get.helm.sh/helm-v3.2.4-linux-amd64.tar.gz
Verifying checksum... Done.
Preparing to install helm into /usr/local/bin
helm installed into /usr/local/bin/helm
...
version.BuildInfo{Version:"v3.2.4",
GitCommit:"0ad800ef43d3b826f31a5ad8dfbb4fe05d143688",
GitTreeState:"clean", GoVersion:"go1.13.12"}
Use --version option to specify desired version
$ ./get_helm.sh -h
Accepted cli arguments are:
[--help|-h ] ->> prints this help
[--version|-v <desired_version>] . When not defined it fetches the latest release from GitHub e.g. --version v3.0.0 or -v canary
[--no-sudo] ->> install without sudo

Docker - Ruby Dependencies installed at build time not available at container up

I am running the following command in my Dockerfile:
RUN apt-get update && apt-get -y install gnupg2
RUN gpg2 --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
RUN curl -sSL https://get.rvm.io | bash -s
RUN /bin/bash -l -c ". /etc/profile.d/rvm.sh && rvm install 2.3.1 && rvm use --default 2.3.1 && gem install bundler"
# some more code
ENTRYPOINT ["/entrypoint.sh"]
In my entrypoint.sh, I am running bundle install. But it's throwing error:
bundle not found
Upon further investigation, I found that none of the dependencies installed during Docker build time seem to be available at container run time. I am probably missing something very basic. Help very appreciated.
The entrypoint.sh does not load rvm, so it doesn't see the rvm-installed Ruby or its bundler.
Load rvm in the entrypoint.sh by adding . /etc/profile.d/rvm.sh and rvm use .. before Ruby is used.

CI/CD Gitlab deployment Failed - dbl command not found

The pipeline .gitlab-ci.yml code successfully works till yesterday, but today i got the error which says “dpl command not found”
the below is my .gitlab-ci.yml file
image: node:8.9.3
stages:
- job1
- test
- production
job1:
stage: job1
script: "ls -l"
test:
stage: test
script:
- npm install
production:
type: deploy
stage: production
image: ruby:latest
script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
- dpl --provider=heroku --app=quailapp --api-key=$HEROKU_PRODUCTION_API_KEY
only:
- master
This is the log Generated,
Setting up rake (10.5.0-2) ...
Setting up libruby2.3:amd64 (2.3.3-1+deb9u2) ...
Setting up ruby2.3 (2.3.3-1+deb9u2) ...
Setting up ruby2.3-dev:amd64 (2.3.3-1+deb9u2) ...
Setting up ruby-dev:amd64 (1:2.3.3) ...
Setting up ruby (1:2.3.3) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
$ gem install dpl
Successfully installed dpl-1.9.6
1 gem installed
$ dpl --provider=heroku --app=quailapp --api-key=$HEROKU_PRODUCTION_API_KEY
/bin/bash: line 68: dpl: command not found
ERROR: Job failed: exit code 1
please help me for finding the solution.
Same here, Issuing the command to install dpl with verbosity: gem install dpl --verbose I've been able to see something weird:
/usr/local/bundle/bin/dpl
Successfully installed dpl-1.9.6
1 gem installed
I don't know why but it is installed in a non-default path. As a workaround I've added the /usr/local/bundle/bin in $PATH environment variable issuing the following command:
export PATH=$PATH:/usr/local/bundle/bin
It works for me and my gitlab ci pipelines are now working again.
BTW, It would be great to know why it has changed suddenly...
Same problem here. I think, it's a problem in docker image. See https://github.com/docker-library/ruby/pull/209
They made some changes and broke path for gems binaries. We have to wait until they merge fix.
UPDATE:
It's already merged and their fix works for me.

Installing RVM on existing ruby1.8 installation

I have a big problem with my Debian server configuration. Someone before me has made a big mess with ruby installation and now i can't manage to get it all working. What i'm trying to do now is to get back to environment, where ruby1.8 is installed and rails app is working correctly with apache+passenger. If it would be working on RVM it would be perfect. Here is the story:
There was ruby 1.8 installed on a server. The person has removed it with sudo apt-get remove ruby1.8 and then installed version 2.0.x manually using those commands:
mkdir /tmp/ruby && cd /tmp/ruby
curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz | tar xz
cd ruby-2.0.0-p247
./configure
make
sudo make install
Then, he has removed all the dirs listed by whereis ruby with rm command.
And here i came - i want to install RVM on this server. The problem is, no matter what i do, i get a lot of errors from all sides. Steps i've done:
# Install RVM
curl -L https://get.rvm.io | bash -s stable
# install 1.8.7 version
rvm install 1.8.7
# use 1.8.7
rvm use 1.8.7
# Install gems
bundle install
First thing (and that's just a tip of iceberg) is that i'm not able to start apache2 in cause of the following error:
apache2: Syntax error on line 203 of /etc/apache2/apache2.conf: Syntax
error on line 1 of /etc/apache2/mods-enabled/passenger.load: Cannot
load
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/libout/apache2/mod_passenger.so
into server:
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/libout/apache2/mod_passenger.so:
cannot open shared object file: No such file or directory Action
'configtest' failed.
Looks like there is even no /usr/lib/ruby/ dir on my system right now.
The question is: is there any way to reset all ruby-releated libraries on debian to the original state (debian without ruby installed) and install working RVM on top of that? Thanks in advance for any help.
Verify if, Is ruby installed correct by ruby -v
Install phusion passenger
$ sudo gem install passenger
$ sudo passenger-install-apache2-module
and then follow onscreen instructions

Resources