01 September 2019
Ruby on Rails is a popular web development framework that was first introduced in 1999. Despite it’s “age”, it’s still a popular choice for developing web applications.
In this tutorial, I’m going to explain how to install Ruby on Rails on Raspberry Pi. I’m going to assume that you have Raspbian installed on your Raspberry Pi.
You should begin by installing the prerequisites, to prepare for the installation of Rails. Type the following command into the Terminal window.
sudo apt-get update && sudo apt-get install -y git curl zlib1g-dev subversion
While you’re already getting the required packages, you’ll need to retrieve the SSL package, SQL database package, and more.
sudo apt-get install -y openssl libreadline6-dev git-core zlib1g libssl-dev sudo apt-get install -y libyaml-dev libsqlite3-dev sqlite3 sudo apt-get install -y libxml2-dev libxslt-dev sudo apt-get install -y autoconf automake libtool bison
Open up the RVM, straight from its repository on GitHub.
curl -L get.rvm.io | bash -s stable --rails
Once you’ve successfully installed the required packages, and have opened up the RVM, it’s recommended that you run a script, just so that you can enable Ruby.
You should now have successfully installed Ruby, and Rails. You can test for Ruby by typing the following command.
If installed correctly, you’ll see a message confirming which version of Ruby is installed, when it was produced, and what it’s using in order to work correctly.
You can also test for Rails by typing in the following command.
Hopefully this was a simple walkthrough to show you how to setup the latest version of the Ruby on Rails web development framework on the Raspberry Pi. Rails is a very popular framework, so it’s great to also have that option on the Raspberry Pi!