I have resolved this by adding in slave configuration:
1. Marked "Environment variables".
2. Added environment variable PATH+EXTRA with value
/home/jenkins/.rvm/gems/ruby-2.5.1/bin:/home/jenkins/.rvm/gems/ruby-2.5.1@global
/bin:/home/jenkins/.rvm/rubies/ruby-2.5.1/bin:/home/jenkins/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Now I need to make work postgresql with pipeline script. Currently on slave
I have working postgres:
jenkins@1090b7609962:~$ service postgresql status
9.6/main (port 5432): online

but during building I catch:

Installing pg 1.1.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native
extension./home/jenkins/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/gems/pg-1.1.3/ext
/home/jenkins/.rvm/rubies/ruby-2.5.1/bin/ruby -r
./siteconf20190415-13476-1lh45x5.rb extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
You need to install postgresql-server-dev-X.Y for building a server-side
extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side
extension or libpq-dev for building a client-side application.

An error occurred while installing pg (1.1.3), and Bundler cannot continue.
Make sure that `gem install pg -v '1.1.3' --source 'https://rubygems.org/'`
succeeds before bundling.


PS
I have resolved it just by apt-get install libpg-dev.

pon., 15 kwi 2019 o 15:32 Dirk Heinrichs <dhein...@opentext.com> napisał(a):

> Am Montag, den 15.04.2019, 14:53 +0200 schrieb Piotr Bracha:
>
> + /home/jenkins/.rvm/rubies/ruby-2.5.1/bin/gem install bundler
>
> /usr/bin/env: ‘ruby’: No such file or directory
>
>
> It's related with this stage but with exactly which command - could you point 
> me to good track:
>
>
> Well, it already tells you (the line starting with "+" is the executed
> command). "gem" itself is a Ruby script, so it needs Ruby to run. It's
> either not installed or not in $PATH.
>
> Bye...
>
> Dirk
>
> --
>
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenText ™ Discovery | Recommind
> *Phone*: +49 2226 15966 18
> *Email*: dhein...@opentext.com
> *Website*: www.recommind.de
> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
> Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan,
> Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
> This e-mail may contain confidential and/or privileged information. If you
> are not the intended recipient (or have received this e-mail in error)
> please notify the sender immediately and destroy this e-mail. Any
> unauthorized copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
> irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
> vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
> Weitergabe dieser Mail sind nicht gestattet.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/da2a5eb646e8497d45aca3f1ad731f53e20662bf.camel%40opentext.com
> <https://groups.google.com/d/msgid/jenkinsci-users/da2a5eb646e8497d45aca3f1ad731f53e20662bf.camel%40opentext.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
*Pozdrawiam / Kind regards,*
Piotr Bracha
Administrator Systemów
*Vasco Electronics sp. z o.o. S.K.A.*
al. Pokoju 1, CTA/350
31-548 Kraków
NIP 677 236 91 51

E-mail:  p.bra...@vasco-electronics.com
[image: Vasco Electronics]  <https://vasco-electronics.com/>[image:
wKarteczkach Logo]  <http://wkarteczkach.pl/>[image: Tłumacze Elektroniczne
Logo] <https://tlumacze-elektroniczne.pl/>
Vasco Electronics Spółka z ograniczoną odpowiedzialnością Spółka
Komandytowo-Akcyjna, Al. Pokoju 1, CTA/350, 31-548 Kraków, Polska, NIP:
6772369151, REGON: 122581850, zarejestrowana w Sądzie Rejonowym dla Krakowa
Śródmieścia XI Wydział KRS pod nr KRS: 0000421705, Kapitał zakładowy 50 000
zł (słownie: pięćdziesiąt tysięcy złotych) w całości wpłacony. Klauzula
Bezpieczeństwa: treść tej wiadomości wraz z załącznikami stanowią
informacje chronione przed ujawnieniem. Jeśli wiadomość ta nie jest
przeznaczona dla Ciebie uprzedzamy, że ujawnianie, kopiowanie,
rozpowszechnianie lub korzystanie z niej lub z załączników jest zabronione.
Jeśli otrzymałeś tę wiadomość przez pomyłkę, uprzejmie prosimy o
niezwłoczne zawiadomienie nadawcy i odesłanie jej z powrotem wraz z
załącznikami a także usunięcie ze swoich systemów.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAKfpvwfFTbvXMnLiYCbZ7WpEvCB6%2Bm%3DkL%3DYMZfCfD9M4wvYPSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to