A short note about the framework:
Ruby on Rails was written in the programming language "Ruby". It was created as far back as 2004, and gained its popularity through an interaction with Apple in 2006. At that time "Apple" announced that it will ship "Ruby on Rails" together with Mac OS X 10.5 "Leopard" operating system.
Also we must not forget that this framework has influenced the development of web applications through innovative features such as creation of database tables, migration and creation of presentation frameworks to ensure fast application development.
The uniqueness of Ruby
There are many web development frameworks in the programming world, but Django and Ruby on Rails stand out the most.
This makes them the most popular web development frameworks and this popularity will continue to grow.
Scalability
While Django inherited its scalability from Python, it is still slightly behind Rails. It has better scalability, which is a result of its qualities of freedom and code flexibility. Both are heavyweight web development frameworks, so they are both designed with scalability in mind, but in this case the win goes to Ruby on Rails.
Syntax
Ruby's syntax is known to be very flexible. However, this can not always be attributed to the advantages of Ruby on Rails. It can cause problems and make it difficult to pass a project to other team members, as the same function can be implemented in different ways, creating confusion.
Whereas Python advocates that there should only be one obvious way to do something, which makes the code easier to debug and read.
Update the packages on the system:
Install packages:
Now it remains to install the remaining packages to make it work:
Installation through Rbenv:
Next, the Ruby installation will be handled by the Rbenv manager. This will speed up the installation process. First install rbenv , then ruby-build.
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
Install ruby-build:
exec $SHELL
Install the Ruby programming language using the commands below:
rbenv global 3.1.2
A bit about Rbenv:
This is a command line tool used to install Ruby on Rails, it also provides a good environment for developing applications using Ruby on Rails.
Databases for Rails:
By standard, sqlite3 is installed, but it is better to use another database, for example PostgreSQL or MySQL. In our case, we will use PosgreSQL. (But it also takes into account how to enable MySQL).
A little bit about sqlite3:
This database was developed in the spring of 2000. The purpose of developing SQLite - was to be able to work with the program without installing a database management system or the need to involve the database administrator.
SQLite is one of the four formats recommended for long-term storage of data sets approved for use by the Library of Congress.
A little about PostgreSQL:
It is a free, open-source relational database management system. It began back in 1982, evolving from the Ingres project which was developed at the University of California, Berkeley.
PostgreSQL gained popularity due to its query optimizations. It combines many indexes for different purposes and makes query execution much simpler and more efficient because it prescribes which steps to perform and in what time frame.
A little about MySQL:
It is free and open source software under the GNU General Public License and is also available under various proprietary licenses. MySQL has standalone clients which allow users to directly access and interact with the database, but more often MySQL is used with other programs to implement applications that require relational database capabilities.
To change the ip address of the server, type the command below:
rails s -b 45.138.24.121
We can go to our server using ip-server:3000
Conclusion:
This publication makes it easy to install Ruby on Rails on your Ubuntu server.
The only question that remains is what framework to choose and why?