Skip to main content

Testing RVM setup with Sinatra sample app r226 (with gem install pg problem and solution)

> Terminal:
mccrazy@Lenovo-N22:~$ cd Documents/
mccrazy@Lenovo-N22:~/Documents$ cd proyekto/
mccrazy@Lenovo-N22:~/Documents/proyekto$ ls
r226
mccrazy@Lenovo-N22:~/Documents/proyekto$ cd r226/
You are using '.rvmrc', it requires trusting, it is slower and it is not compatible with other ruby managers,
you can switch to '.ruby-version' using 'rvm rvmrc to ruby-version'
or ignore this warning with 'rvm rvmrc warning ignore /home/mccrazy/Documents/proyekto/r226/.rvmrc',
'.rvmrc' will continue to be the default project file in RVM 1 and RVM 2,
to ignore the warning for all files run 'rvm rvmrc warning ignore all.rvmrcs'.

********************************************************************************
* NOTICE                                                                       *
********************************************************************************
* RVM has encountered a new or modified .rvmrc file in the current directory,  *
* this is a shell script and therefore may contain any shell commands.         *
*                                                                              *
* Examine the contents of this file carefully to be sure the contents are      *
* safe before trusting it!                                                     *
* Do you wish to trust '/home/mccrazy/Documents/proyekto/r226/.rvmrc'?         *
* Choose v[iew] below to view the contents                                     *
********************************************************************************
y[es], n[o], v[iew], c[ancel]> y
Using: /home/mccrazy/.rvm/gems/ruby-2.2.6@r226
mccrazy@Lenovo-N22:~/Documents/proyekto/r226$ subl ../r226/
mccrazy@Lenovo-N22:~/Documents/proyekto/r226$ bundle -v
The program 'bundle' is currently not installed. You can install it by typing:
sudo apt install ruby-bundler
mccrazy@Lenovo-N22:~/Documents/proyekto/r226$ bundler -v
The program 'bundler' is currently not installed. You can install it by typing:
sudo apt install ruby-bundler
mccrazy@Lenovo-N22:~/Documents/proyekto/r226$ bundle install
The program 'bundle' is currently not installed. You can install it by typing:
sudo apt install ruby-bundler
mccrazy@Lenovo-N22:~/Documents/proyekto/r226$ gem install bundler
Fetching: bundler-1.14.6.gem (100%)
Successfully installed bundler-1.14.6
Parsing documentation for bundler-1.14.6
Installing ri documentation for bundler-1.14.6
Done installing documentation for bundler after 18 seconds
1 gem installed
mccrazy@Lenovo-N22:~/Documents/proyekto/r226$ bundle install

[!] There was an error parsing `Gemfile`: syntax error, unexpected **arg, expecting end-of-input. Bundler cannot continue.

 #  from /home/mccrazy/Documents/proyekto/r226/Gemfile:20
 #  -------------------------------------------
 #  end
 >  ***
 #  -------------------------------------------
mccrazy@Lenovo-N22:~/Documents/proyekto/r226$ bundle install
Fetching gem metadata from http://rubygems.org/.............
Fetching version metadata from http://rubygems.org/..
Resolving dependencies...
Installing concurrent-ruby 1.0.5
Installing i18n 0.8.1
Installing minitest 5.10.1
Installing thread_safe 0.3.6
Installing arel 8.0.0
Installing bond 0.5.1 with native extensions
Installing pg 0.20.0 with native extensions
Installing rack 1.6.5
Installing tilt 2.0.7
Installing sqlite3 1.3.13 with native extensions
Using bundler 1.14.6
Installing tzinfo 1.2.3
Installing ripl 0.7.1
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/home/mccrazy/.rvm/rubies/ruby-2.2.6/bin/ruby -r
./siteconf20170506-3303-1gne57u.rb extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/home/mccrazy/.rvm/rubies/ruby-2.2.6/bin/$(RUBY_BASE_NAME)
    --with-pg
    --without-pg
    --enable-windows-cross
    --disable-windows-cross
    --with-pg-config
    --without-pg-config
    --with-pg_config
    --without-pg_config
    --with-pg-dir
    --without-pg-dir
    --with-pg-include
    --without-pg-include=${pg-dir}/include
    --with-pg-lib
    --without-pg-lib=${pg-dir}/lib

extconf failed, exit code 1

Gem files will remain installed in
/home/mccrazy/.rvm/gems/ruby-2.2.6@r226/gems/pg-0.20.0 for inspection.
Results logged to
/home/mccrazy/.rvm/gems/ruby-2.2.6@r226/extensions/x86_64-linux/2.2.0/pg-0.20.0/gem_make.out

An error occurred while installing pg (0.20.0), and Bundler cannot
continue.
Make sure that `gem install pg -v '0.20.0'` succeeds before bundling.
mccrazy@Lenovo-N22:~/Documents/proyekto/r226$ sudo apt-get install postgresql-client libpq5 libpq-dev
[sudo] password for mccrazy:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  comerr-dev krb5-multidev libgssrpc4 libkadm5clnt-mit9 libkadm5srv-mit9
  libkdb5-8 postgresql-client-9.5 postgresql-client-common
Suggested packages:
  krb5-doc krb5-user postgresql-doc-9.5 postgresql-9.5
The following NEW packages will be installed:
  comerr-dev krb5-multidev libgssrpc4 libkadm5clnt-mit9 libkadm5srv-mit9
  libkdb5-8 libpq-dev libpq5 postgresql-client postgresql-client-9.5
  postgresql-client-common
0 upgraded, 11 newly installed, 0 to remove and 156 not upgraded.
Need to get 1,458 kB of archives.
After this operation, 6,062 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ph.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgssrpc4 amd64 1.13.2+dfsg-5ubuntu2 [54.5 kB]
Get:2 http://ph.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libkdb5-8 amd64 1.13.2+dfsg-5ubuntu2 [37.1 kB]
Get:3 http://ph.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libkadm5srv-mit9 amd64 1.13.2+dfsg-5ubuntu2 [51.3 kB]
Get:4 http://ph.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libkadm5clnt-mit9 amd64 1.13.2+dfsg-5ubuntu2 [36.7 kB]
Get:5 http://ph.archive.ubuntu.com/ubuntu xenial/main amd64 comerr-dev amd64 2.1-1.42.13-1ubuntu1 [38.2 kB]
Get:6 http://ph.archive.ubuntu.com/ubuntu xenial-updates/main amd64 krb5-multidev amd64 1.13.2+dfsg-5ubuntu2 [113 kB]
Get:7 http://ph.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpq5 amd64 9.5.6-0ubuntu0.16.04 [78.2 kB]
Get:8 http://ph.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpq-dev amd64 9.5.6-0ubuntu0.16.04 [154 kB]
Get:9 http://ph.archive.ubuntu.com/ubuntu xenial/main amd64 postgresql-client-common all 173 [28.3 kB]
Get:10 http://ph.archive.ubuntu.com/ubuntu xenial-updates/main amd64 postgresql-client-9.5 amd64 9.5.6-0ubuntu0.16.04 [861 kB]
Get:11 http://ph.archive.ubuntu.com/ubuntu xenial/main amd64 postgresql-client all 9.5+173 [5,350 B]
Fetched 1,458 kB in 3s (408 kB/s)              
Selecting previously unselected package libgssrpc4:amd64.
(Reading database ... 186379 files and directories currently installed.)
Preparing to unpack .../libgssrpc4_1.13.2+dfsg-5ubuntu2_amd64.deb ...
Unpacking libgssrpc4:amd64 (1.13.2+dfsg-5ubuntu2) ...
Selecting previously unselected package libkdb5-8:amd64.
Preparing to unpack .../libkdb5-8_1.13.2+dfsg-5ubuntu2_amd64.deb ...
Unpacking libkdb5-8:amd64 (1.13.2+dfsg-5ubuntu2) ...
Selecting previously unselected package libkadm5srv-mit9:amd64.
Preparing to unpack .../libkadm5srv-mit9_1.13.2+dfsg-5ubuntu2_amd64.deb ...
Unpacking libkadm5srv-mit9:amd64 (1.13.2+dfsg-5ubuntu2) ...
Selecting previously unselected package libkadm5clnt-mit9:amd64.
Preparing to unpack .../libkadm5clnt-mit9_1.13.2+dfsg-5ubuntu2_amd64.deb ...
Unpacking libkadm5clnt-mit9:amd64 (1.13.2+dfsg-5ubuntu2) ...
Selecting previously unselected package comerr-dev.
Preparing to unpack .../comerr-dev_2.1-1.42.13-1ubuntu1_amd64.deb ...
Unpacking comerr-dev (2.1-1.42.13-1ubuntu1) ...
Selecting previously unselected package krb5-multidev.
Preparing to unpack .../krb5-multidev_1.13.2+dfsg-5ubuntu2_amd64.deb ...
Unpacking krb5-multidev (1.13.2+dfsg-5ubuntu2) ...
Selecting previously unselected package libpq5:amd64.
Preparing to unpack .../libpq5_9.5.6-0ubuntu0.16.04_amd64.deb ...
Unpacking libpq5:amd64 (9.5.6-0ubuntu0.16.04) ...
Selecting previously unselected package libpq-dev.
Preparing to unpack .../libpq-dev_9.5.6-0ubuntu0.16.04_amd64.deb ...
Unpacking libpq-dev (9.5.6-0ubuntu0.16.04) ...
Selecting previously unselected package postgresql-client-common.
Preparing to unpack .../postgresql-client-common_173_all.deb ...
Unpacking postgresql-client-common (173) ...
Selecting previously unselected package postgresql-client-9.5.
Preparing to unpack .../postgresql-client-9.5_9.5.6-0ubuntu0.16.04_amd64.deb ...
Unpacking postgresql-client-9.5 (9.5.6-0ubuntu0.16.04) ...
Selecting previously unselected package postgresql-client.
Preparing to unpack .../postgresql-client_9.5+173_all.deb ...
Unpacking postgresql-client (9.5+173) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Setting up libgssrpc4:amd64 (1.13.2+dfsg-5ubuntu2) ...
Setting up libkdb5-8:amd64 (1.13.2+dfsg-5ubuntu2) ...
Setting up libkadm5srv-mit9:amd64 (1.13.2+dfsg-5ubuntu2) ...
Setting up libkadm5clnt-mit9:amd64 (1.13.2+dfsg-5ubuntu2) ...
Setting up comerr-dev (2.1-1.42.13-1ubuntu1) ...
Setting up krb5-multidev (1.13.2+dfsg-5ubuntu2) ...
Setting up libpq5:amd64 (9.5.6-0ubuntu0.16.04) ...
Setting up libpq-dev (9.5.6-0ubuntu0.16.04) ...
Setting up postgresql-client-common (173) ...
Setting up postgresql-client-9.5 (9.5.6-0ubuntu0.16.04) ...
update-alternatives: using /usr/share/postgresql/9.5/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode
Setting up postgresql-client (9.5+173) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
mccrazy@Lenovo-N22:~/Documents/proyekto/r226$ bundle installFetching gem metadata from http://rubygems.org/..............
Fetching version metadata from http://rubygems.org/..
Resolving dependencies...
Using concurrent-ruby 1.0.5
Using i18n 0.8.1
Using minitest 5.10.1
Using thread_safe 0.3.6
Using arel 8.0.0
Using bond 0.5.1
Installing pg 0.20.0 with native extensions
Using rack 1.6.5
Using tilt 2.0.7
Using sqlite3 1.3.13
Using bundler 1.14.6
Using tzinfo 1.2.3
Using ripl 0.7.1
Installing rack-protection 1.5.3
Installing rack-test 0.6.3
Installing shotgun 0.9.2
Installing activesupport 5.1.0
Installing ripl-multi_line 0.3.1
Installing sinatra 1.4.8
Installing ripl-rack 0.2.1
Installing activemodel 5.1.0
Installing tux 0.3.0
Installing activerecord 5.1.0
Installing sinatra-activerecord 2.0.13
Bundle complete! 7 Gemfile dependencies, 24 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
mccrazy@Lenovo-N22:~/Documents/proyekto/r226$

Comments

Popular posts from this blog

Ubuntu 16.04 LT - Installing Chromium browser

> Type these commands about this PPA : $ sudo add-apt-repository ppa:canonical-chromium-builds/stage $ sudo apt-get update $ sudo apt-get install chromium-browser > Terminal: mccrazy@Lenovo-N22:~$ sudo add-apt-repository ppa:canonical-chromium-builds/stage [sudo] password for mccrazy:  Testing site just before upload to Ubuntu main. Things here are either broken and not ready to use, or landing in the distro anyway very soon. You shouldn't use this.  More info: https://launchpad.net/~canonical-chromium-builds/+archive/ubuntu/stage Press [ENTER] to continue or ctrl-c to cancel adding it gpg: keyring `/tmp/tmp6cfppy_r/secring.gpg' created gpg: keyring `/tmp/tmp6cfppy_r/pubring.gpg' created gpg: requesting key 5B393194 from hkp server keyserver.ubuntu.com gpg: /tmp/tmp6cfppy_r/trustdb.gpg: trustdb created gpg: key 5B393194: public key "Launchpad PPA for Canonical Chromium Build Team" imported gpg: Total number processed: 1 gpg:               imported: 1  (RSA...

Ubuntu 20.04 LTS | Installing OpenJDK 11 (LTS) JDK, JRE, HotSpot

https://adoptopenjdk.net/installation.html#linux-pkg ctrl + f => Linux RPM and DEB installer packages bboy@bboy-LE7450:~$ cat /etc/os-release | grep UBUNTU_CODENAME UBUNTU_CODENAME=focal bboy@bboy-LE7450:~$ sudo apt-get install wget apt-transport-https gnupg [sudo] password for bboy: Reading package lists... Done Building dependency tree       Reading state information... Done wget is already the newest version (1.20.3-1ubuntu1). wget set to manually installed. gnupg is already the newest version (2.2.19-3ubuntu2.1). gnupg set to manually installed. The following packages were automatically installed and are no longer required:   linux-headers-5.8.0-45-generic linux-hwe-5.8-headers-5.8.0-45   linux-image-5.8.0-45-generic linux-modules-5.8.0-45-generic   linux-modules-extra-5.8.0-45-generic Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed:   apt-transport-https 0 upgraded, 1 newly installed, 0 to remove and 21 not upgraded. Need to get 1,...