@StatelessCode
  @StatelessCode
Stateless Code | Install Ruby and Rails with Databases on Ubuntu 24.04 @StatelessCode | Uploaded July 2024 | Updated October 2024, 54 minutes ago.
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 youtu.be/yHxuNUovS20
- Install Node.js (versions 18, 20, 22) with NVM on Ubuntu 24.04 youtu.be/YyEf1QWfg9Y
- Install Visual Studio Code on Ubuntu 24.04 youtu.be/GdmHY1JhLI8
- Install Git on Ubuntu 24.04 and Configure for Verified Commits in GitHub youtu.be/CagiEjuqKxU
- Why Rails in the 2020s? youtu.be/f1ca3rKQSD0

Older Ruby and Rails install videos from 2021:
- Codecast: Install Rails 6, PostgreSQL 13, MariaDB 10.5 youtu.be/mW3vAvUg2Ao
- Install RVM and Ruby with Troubleshooting youtu.be/h-JBRJH8W7A

Featured Playlist:
- Getting Started with Rails 7 Playlist youtube.com/playlist?list=PL9kkbu1kLUePk2NNqMT14iL3Dis2mbMdK

Resources that we relied upon for this solution:
- Ruby Website: ruby-lang.org/en
- Ruby on Rails Website: rubyonrails.org
- RVM Website: rvm.io
- GoRails Install Ruby On Rails on Ubuntu 24.04 Noble Numbat 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.
Install Ruby and Rails with Databases on Ubuntu 24.04Upgrade to Ruby 3.2.1 and Rails 7.0.4.3Nerd Christmas 2022 - Ruby 3.2 Released!Codecast: statelesscode.com WordPress 07: Add Brand Colors with TailwindInstall Node.js (versions 18, 20, 22) with NVM on Ubuntu 24.04Codecast: Create a RubyGem 59: Add Ability Score Functionality to Benchmark SuiteMediocre Karaoke - Spinning Wheel by Blood, Sweat & TearsCodecast: Getting Started with Rails 7 17: Refactor TestsCodecast: Getting Started with Rails 7 12: Add a Model and Route for CommentsCodecast: Create a RubyGem 85: Release Version 0.4.0!Codecast: Create a RubyGem 84: Update Docs and Extend ConvenienceMethods into NerdDice, MergeWrite System Tests for Devise Cancel My Account and Get Working With Turbo

Install Ruby and Rails with Databases on Ubuntu 24.04 @StatelessCode

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER