EdPaste is a tool for pasting snippets of source code, written in Ruby on Rails. In this tutorial, we will go through the process of installing EdPaste on Linux Mint Latest.
Before we begin, make sure you have the following:
Git is a version control system that allows developers to track changes to their code. EdPaste is hosted on Github, so we will use Git to download the necessary files. To install Git on Linux Mint, run the following command:
sudo apt-get update && sudo apt-get install git
Now that we have Git installed, we can clone the EdPaste repository by running the following command:
git clone https://github.com/ptnr/EdPaste.git
This will create a new directory called EdPaste
in your current directory, containing all the files and folders necessary for EdPaste.
EdPaste is written in Ruby on Rails, so we need to make sure we have Ruby and Ruby on Rails installed. Run the following commands to install them:
sudo apt-get install ruby-full
sudo gem install rails
EdPaste uses PostgreSQL as its database, so we need to install it. Run the following command to install PostgreSQL:
sudo apt-get install postgresql
By default, PostgreSQL is not configured to allow remote connections. We need to edit its configuration file to allow connections from localhost. Run the following command to edit the file:
sudo nano /etc/postgresql/<version>/main/postgresql.conf
Replace <version>
with the version of PostgreSQL you have installed, for example 12
.
In the file, find the line that says #listen_addresses = 'localhost'
and uncomment it by removing the #
at the beginning. Then, add 127.0.0.1
to the list of addresses, like this:
listen_addresses = 'localhost, 127.0.0.1'
Save and exit the file by pressing Ctrl+X
, then Y
, then Enter
.
Next, we need to edit the pg_hba.conf
file to allow connections from the postgres
user. Run the following command to edit the file:
sudo nano /etc/postgresql/<version>/main/pg_hba.conf
Replace <version>
with the version of PostgreSQL you have installed, for example 12
.
In the file, find the line that says local all all peer
and change peer
to md5
, like this:
local all all md5
Save and exit the file by pressing Ctrl+X
, then Y
, then Enter
.
Restart PostgreSQL by running the following command:
sudo systemctl restart postgresql
Now that we have PostgreSQL set up, we need to create the EdPaste database. Run the following command from within the EdPaste
directory:
bundle install
bundle exec rake db:setup
This will install all the necessary Ruby gems and create the database.
We're almost done! To start the EdPaste server, run the following command from within the EdPaste
directory:
rails server
This will start the server, and you should see output like this:
=> Booting Puma
=> Rails 6.0.3.2 application starting in development
=> Run `rails server --help` for more startup options
Puma starting in single mode...
* Version 5.3.2 , codename: Mysterious Traveller
* Min threads: 5, max threads: 5
* Listening on tcp://127.0.0.1:3000
Use Ctrl-C to stop
Now you can open your web browser and navigate to http://localhost:3000/
to use EdPaste!
In this tutorial, we went through the process of installing EdPaste on Linux Mint Latest. By following these steps, you should now have a fully functional version of EdPaste running on your machine. Happy coding!
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!