Creating a Blog using Ruby and Rails- Part 1

Khemlall Mangal
5 min readFeb 10, 2021


Summary: I wanted to create a unique blog for myself with various features created from scratch. I also had a special interest in learning ruby and rails and i decide what is a better way to learn than working on something practical. Something i really wanted. I have decided to embark on this journey and to document my challenges and resolution. This may help someone who may face similar issue i faced while learning rails and creating my own blog.

Environment & Development Tool.

I don’t want to waste time with the hefty setup and i wanted to have an environment where I can code from anywhere with an internet connection. Therefore I choose use Code anywhere cloud base IDE to create my blog. you can sign up for a free account and create a container. → create a new project

Add a project name:

Create a Demo Project
Click on Open to start project

Now provide a name to your project and select Ruby on rails Ubuntu 16.04 system and click create

Once completed you will see something like this: with the container and URL you will need to access your site in development. To access this page again you will need to right click on your project(example: demoproject) and click info.

You should see this page again.

Right click on the project and start a terminal by click ssh terminal

click on ssh terminal to start terminal and development command.

Environment Setup and Configuration.

  1. Check RVM version rvm — version and get stable with command rvm get stable
rvm --version

2. Check your ruby version ruby — version (dash dash), RVM install 3.0.0

ruby --version

Webpacker needs newer version of node in rails 6. currently in our system the node we have is lower than 12 so we need greater than that.

Lets check and install latest version of node.


nvm ls-remote

This should give us a list and point us to the latest version.

Latest version of ruby.

Run command nvm install <LATEST VERSION>

nmv install 14.15.5

Install yarn —

- curl -sS | sudo apt-key add -

add to list

echo "deb stable main" | sudo tee /etc/apt/sources.list.d/yarn.listsudo apt update && sudo apt install yarn

run the following command

gem install rails

Creating a Blog skeleton in rails and configure to be able to view the starter page.

Let create a blog with the following command.

  1. Rails new command to create a blog… you can name your blog anything. I am going to call my blog
rails new blog

2. Lets CD into the Blog folder

Before we can start our Server we need to make a configuration change to be able to view our page in code anywhere.

Refresh your blog and then lets cd into blog folder

cd blog
Cd into blog

Configuration: go to Config -> development rb and on the bottom copy the access link and add the link to your development.rb file towards the bottom.

a) config.hosts << “”

config.hosts << “”

Now lets start the rails server to make sure everything is up and ready for us to start…..

in your terminal (project -> right click- > SHH terminal → navigate to blog if you are not already there….

rails s — binding=

check server running

server show starting

Test by click on the link which can be found by right clicking on project and click info as mentioned previously above. This is the same link you used to enable access within your development.rb file above.

YAH!! We are online…. If you have any issue please add comments and i can assist in resolving your issue.



Khemlall Mangal

I am a passionate coder, QA Engineer, and someone who enjoys the outdoors.