RVM Installation issue : Public Key download issue

You might have gone through the RVM installation and tried this command

$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

This command actually downloads the verified public key and verifies the integrity of the installer script file.

Problem:

$ gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3

gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error

 

Solution:

Despite of that error, you execute the following command

$ \curl -sSL https://get.rvm.io | bash -s stable --ruby

# Output 

Downloading https://github.com/rvm/rvm/archive/1.27.0.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.27.0/1.27.0.tar.gz.asc
gpg: Signature made मंगलबार 29 मार्च 2016 using RSA key ID BF04FF17
gpg: Can't check signature: No public key
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found.
Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).

GPG signature verification failed for '/home/john/.rvm/archives/rvm-1.27.0.tgz' - 'https://github.com/rvm/rvm/releases/download/1.27.0/1.27.0.tar.gz.asc'!
try downloading the signatures:

gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

or if it fails:

command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -

the key can be compared with:

https://rvm.io/mpapis.asc
 https://keybase.io/mpapis

The solution is there in the error message. Try

$ gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

If it fails, try this

$ curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -

And try this again

$ \curl -sSL https://get.rvm.io | bash -s stable --ruby

 

You are done,

Thanks for visiting

Advertisements

Note: Open (PG)PostGreSQL in command line and do some stuffs

To access postgres console:

$ sudo -u postgres -i

postgres@host:~$ psql

or

$ sudo -u postgres psql

[sudo] password for john: 
psql (9.3.12)
Type "help" for help.

postgres=# 

 

# For help
postgres=# help
 You are using psql, the command-line interface to PostgreSQL.
Type: \copyright for distribution terms
 \h for help with SQL commands
 \? for help with psql commands
 \g or terminate with semicolon to execute query
 \q to quit
# For help
postgres=# \h
 Available help:
 ABORT CLUSTER DEALLOCATE END
 ALTER AGGREGATE COMMENT DECLARE EXECUTE
 ALTER COLLATION COMMIT DELETE EXPLAIN

Create database

# database command has to end with semicolon
postgres=# create database july_prod_dump1;
CREATE DATABASE

Alter permission

ALTER USER new_user CREATEDB

 

Unix : SSH server add new user’s ssh keys

You have not chosen to deploy your application to fancy web hosting services like Engineyard, Digitalocean, or Heroku then you might be willing to know how to give other developers collaborating in this project access to the server via SSH. In other words you want to let others to deploy the application via SSH (eg. Capistrano).

Well, its pretty much simpler than you have thought.  Follow the steps

  • Copy the public key of your colleague to clipboard ( Ctrl + C )
  • SSH into the server
  • If you want to use the same username for all developer (say `deployer`)
    • $ cd /home/deployer/.ssh
      $ sudo nano authorized_keys
    • Paste the SSH public key of your colleague at the end of the file
    • Save the file
    • And you are Done!
    • Now your colleague should have access to the server
  • If want a separate username for every individual
    • It would be great if you create separate user-group for deployment purposes like `deployers`
    • create a new user in that group with privileges you like
      • to give sudo access you need to update the sudoers file
      • The configuration file for sudo is /etc/sudoers
    • goto that particular user’s home directory
    • add his ssh public key to the /home/user/.ssh/authorized_keys file
      • the .ssh folder might not already be available, you can create though
      • $ mkdir /home/user/.ssh
      • copy the content using `nano or echo`  into the file
    • Now you are Done!

 

Ubuntu: Open localhost database in pgadmin

Make sure you have installed PGAdmin

sudo apt-get install pgadmin3

now set your database

$ sudo -u postgres psql

it will ask you password, get inside and alter the user’s password if you have not already set it

postgres=# alter user john with password 'mypassword';

and then open pg admin, fill the form and get inside

pgadmin-09 13:04:25

some helpful links

http://www.indjango.com/ubuntu-install-postgresql-and-pgadmin/

Ruby On Rails : Search kick : Elastic Search setup in Ubuntu 14.04

Coming Soon..

Resources
https://github.com/elasticsearch/elasticsearch-rails

For Searchkick
https://github.com/ankane/searchkick
https://github.com/ankane/searchkick#advanced

What you need to do to make the elasticsearch service running?
cd ~

sudo apt-get update

sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY

wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.0.deb

sudo dpkg -i elasticsearch-1.1.0.deb

sudo service elasticsearch start
Product.reindex
Product.clean_indices