Create a Database in MongoDB

MongoDB is one of the most popular NoSQL databases around. The popularity of NoSQL databases boomed with the MEAN and MERN.

Creating a database is really simple especially in MongoDB.

use your_database_name
switched to db your_database_name

It is really that simple. There is one bit of a problem here. When you use the show dbs command, you won’t see any new databases. This is because the new database doesn’t have any collection yet.

> show dbs
admin   0.000GB
config  0.000GB
local   0.000GB

Let’s create our collection

> db.createCollection('books')
{ "ok" : 1 }
> show dbs
admin               0.000GB
config              0.000GB
local               0.000GB
your_database_name  0.000GB

Now that’s how to create your database in MongoDB.

 Opera Browser: Show Full Address with Query Strings or GET parameters

Opera by default hides the query string or GET parameters. To show the full address, you need to enable it.

Steps to get to the Settings:

1 Click on Preferences
2 Click on Advanced on the Sidebar
3 Click on Advanced to show dropdown menu if not yet shown
4 Look for the User Interface section

At this point, enable Show full URL in combined search and address bar

Screen shot 2018 10 29 at 5.44.43 pm


Opera snapshot 2018 10 29 174317 settings

 Gem::Ext::BuildError: ERROR: Failed to build gem native extension for the JSON gem

The dreaded Gem::Ext::BuildError: ERROR: Failed to build gem native extension has been in existence since I started dabbling with higher versions of rails.

Fetching gem metadata from https://rubygems.org/...........
Fetching rake 11.2.2
Installing rake 11.2.2
Using i18n 0.7.0
Fetching json 1.8.3
Installing json 1.8.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/user/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
/Users/user/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20170619-29262-1b1jy13.rb extconf.rb
creating Makefile

Remove the Gemfile.lock file

Removing the Gemfile.lock file lets your bundler do its work and find the compatible versions for your gems. Run bundler and you’ll have a nice install and have a new Gemfile.lock file.

Bundle complete! 51 Gemfile dependencies, 177 gems now installed.

Voila!

 Git: Could not read from remote repository error

ERROR: Permission to user-coder/repo-name.git denied to your_username.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Permissions

Ask the repo owner if he has added you as a collaborator. If not, this is most likely your problem.

Invitations

A common error when collaborating with other users on Github. The most common way to fix this is to check for any invitations from the said repository. Accepting this invitation would ultimately fix your problem.

Zpmbif