Address already in use – bind(2) for “127.0.0.1” port 3000 (Errno::EADDRINUSE) | Check what process is running in your localhost

I was trying to create a new rails app and got this error:

Address already in use – bind(2) for “127.0.0.1” port 3000 (Errno::EADDRINUSE)

To fix it I first check which process used my port 3000:

And I got this output:

So now I can stopped it using its pid:

I checked again if something was running in my port 3000 and I didn’t get any output so I run my rails s command and everything worked fine!

Rubber duck debugging

Last week I was working in the Music Library CLI Lab and I was not able to solve the last method I had to pass all the tests. I do not think it was more difficult than all the previous ones but even so I was not able to see what I was doing wrong. Maybe I was tired because I had been studying for several hours and I needed to clear my mind so I took a break. Talking to a friend about this situation, he told me why I did not try to explain my problem to a rubber duck.

Yap. I thought he was kidding but when I started working in my Lab I tried it and while I was explaining to the duck my problem I realised what was happening in 5 minutes!

Rubber duck debugging is a method of debugging code and a very effective one.

Here I leave a picture of my best study partner!Rubber Duck Debugging

GitHub Pages

You can have a website with GitHub Pages hosted directly from your GitHub repository. First thing you have to create this repository, and it will be named using your GitHub username + github.io. For example, my username in GitHub is DianaBaRo, so my GitHub Page is:Ā https://dianabaro.github.io/.

They just allow one web page for user. What I did is create a table with links to all my different projects, a page that works as a kind of an index.

Your repository has to have an index.html. After adding folders with my projects to this repository I changed index.html to home.html and it didn’t work well, they ask you for the first one. Don’t change its name!

Environment Setup for Javascript

In order to create a project I have had to setup my development environment. I used the following tools:

  1. Browser
  2. Editor

I could use any browser but I choose working with Google Chrome due to Chrome DevTools. To access them:

  • open a Chrome page
  • open the View menu at the top of your browser window
  • select Developer
  • and then select Developer Tools

As my editor I have chosen Visual Studio Code and jsfiddle.net to keep some snippets I was interested on.

Visual Studio Code is a cross-platform editor, that means you can use it with Windows, Linux and macOS. It helps you with debugging, with Git control and you can install plugins.

Visual Studio vs Visual Studio Code

The main difference is that VS Code is an Editor while VS is an IDE. Ā Check these two postsĀ for more information:

 

 

WordPress.org

Here are the reasons why I have Ā chosen this publishing platform:

[ First: WordPress.org is not WordPress.com. Nice post about this matter. ]

  1. It is a free open-source.
  2. You own your website and can customise as wanted using PHP, CSS and MySQL.
  3. Self-hosted version. I already had my web domain and hosting with Go Daddy. It is very easy install WordPress on your Hosting Account.