In this video we take a fresh installation of Ubuntu 24.04 (see the link to the video where we installed it below) and set it up so we can develop applications using Ruby on Rails.
Before we can install Ruby, we first need to install some dependencies onto our system. There have been some slight changes to the set of dependencies since the last Ruby install video we made in 2021 using Ubuntu 20.04. In particular, libgconf-2-4 is no longer needed (and the install will error out if you try to include it in the list of packages).
We use Ruby Version Manager (RVM) to install Ruby. Pay attention to the post install configuration steps and do a full system reboot. In the aforementioned 2021 video, it didn't go smoothly.
We install the current versions of Ruby (3.3.3) and Ruby on Rails (7.1.3.4) at the time of the recording. There are 3 primary database adapters for Rails. SQLite3 comes built-in as the default and is what you get if you run `rails new` without specifying a database. Rails also comes with a MySQL adapter and a PostgreSQL adapter. We create initial applications for each. If you have a particular database in mind, you can skip to that section of the video.
Here are (most of) the commands we execute in the video:
```
install dependencies
sudo apt install -y autoconf bison build-essential curl g++ gcc git git-core libffi-dev libgdbm-dev libncurses-dev libreadline-dev libsqlite3-dev libssl-dev libxi6 libyaml-dev make sqlite3 xvfb zip zlib1g-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common gnupg2
optional dependencies if using ActionText and/or ActiveStorage
sudo apt install -y libvips-tools libvips-dev libvips42
rvm commands
gpg2 --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt install rvm
sudo usermod -a -G rvm "$USER"
source /etc/profile.d/rvm.sh
mkdir -p ~/.rvm/user/installs
ruby commands
rvm install 3.3.3
/bin/bash --login
rvm use 3.3.3 --default
ruby -v
irb
rails commands
gem install rails
rails new [app name] [-d database or omit to use sqlite3]
installs MariaDB 10.11
sudo apt install mariadb-server libmariadb-dev
install PostgreSQL 16
sudo apt install postgresql libpq-dev
```
This video covers:
00:00:00 Introduction
00:02:38 Install dependencies for Ruby and Rails (see command above)
00:05:06 Install optional dependencies for ActionText and ActiveStorage
00:05:35 Install Ruby Version Manager (RVM) via Personal Package Archive (PPA)
00:07:45 RVM post-install configuration and reboot machine
00:10:34 Install current version of Ruby (3.3.3 at time of recording)
00:12:59 Install Ruby on Rails version 7.1.x
00:15:09 Create a Rails app and start the server (using SQLite3)
00:18:17 Optional: Install MariaDB and create a Rails app with the MySQL adapter and configure
00:26:20 Optional: Install PostgreSQL and create a Rails app with the PostgreSQL adapter
#setup #configuration #install #linux #ubuntu #debian #deb #terminal #ubuntu24 #lts #ruby #rails #rubyonrails #rvm #rails7 #rails7-1 #sqlite3 #mariadb #mysql #postges #postgresql
See other related StatelessCode videos:
Install Ubuntu 24.04 LTS Desktop • Install Ubuntu 24.04 LTS Desktop
Install Node.js (versions 18, 20, 22) with NVM on Ubuntu 24.04 • Install Node.js (versions 18, 20, 22)...
Install Visual Studio Code on Ubuntu 24.04 • Install Visual Studio Code on Ubuntu ...
Install Git on Ubuntu 24.04 and Configure for Verified Commits in GitHub • Install Git on Ubuntu 24.04 and Confi...
Why Rails in the 2020s? • Why Rails in the 2020s?
Older Ruby and Rails install videos from 2021:
Codecast: Install Rails 6, PostgreSQL 13, MariaDB 10.5 • Codecast: Install Rails 6, PostgreSQL...
Install RVM and Ruby with Troubleshooting • Codecast: Install RVM and Ruby with T...
Featured Playlist:
Getting Started with Rails 7 Playlist • Getting Started with Rails 7
Resources that we relied upon for this solution:
Ruby Website: https://www.ruby-lang.org/en/
Ruby on Rails Website: https://rubyonrails.org/
RVM Website: https://rvm.io/
GoRails Install Ruby On Rails on Ubuntu 24.04 Noble Numbat https://gorails.com/setup/ubuntu/24.04
This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.
Watch video Install Ruby and Rails with Databases on Ubuntu 24.04 online without registration, duration hours minute second in high quality. This video was added by user Stateless Code 04 July 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 421 once and liked it 7 people.