Installation and running processes for the Rails Server we have created for the Yusufreis are as described below.
Download the Server's files at first.
git clone https://github.com/starbuckr/railsserver
Then, go to the directory where our project is located and install necessary packages.
cd railsserver sudo apt install ruby ruby-dev ruby-bundler nodejs npm libsqlite3-dev zlib1-dev sudo npm install yarn -g yarn install --check-files
Configuring Rails Server's Settings
If the Ruby version you are currently using is not 2.5.5, you need to change the
ruby '2.5.5' line in the Gemfile. For example, if your Ruby version is 2.7.0 we need to edit it as this.
After installing packages, configure Gem and database settings.
sudo bundle install rails db:migrate
Running The Server
In order to run the server, use
rails server or
rails s command.
If you want to connect the server from other local machines, you need to change running ip address.
rails s -b 0.0.0.0
You can then access this server from any device connected to that network. For example, if the ip address of our Ubuntu Server machine is 192.168.1.56, you can access the server by entering the address
192.168.1.56:3000 in your browser.
Top comments (0)