Not sure if the best place to put this, but it is more than Fedora, so not specific for “ask Fedora”… but it could live there also.
TLDR - A 50 year old guy tries to go back into programming and chooses fedora Linux and Ruby On Rails as tech stack. This is the first part, where I try to explain step-by-step a possible installation method that worked with me after banging my head to figure it all out. This first part ends with a RoR installation and the first dummy project creation.
Personal background (you can skip this, it’s ok… no issues)
After 10 years in the sidelines as a PO in agility, managing tickets, I started feeling the need to go back to “light” web development.
I needed to see the inner workings of code again, but, “nobody” uses (simple) HTML anymore, PHP is something I used back in the days and Python is for the new kids.
At the same time, on my Linux Distro Hopping Quest I came across Omarchy, and DHH and was pulled into Ruby (on Rails) development rabbit hole. Not because it is a hip language, more of a hipster language, that a 50 year old man should be able to understand as it is, according to many, a developers first language.
It started by installing Omarchy in my newly bought 2011’s second hand Thinkpad T490s (yes, I used this as an excuse to buy my first thinkpad).
I confess that my brain could not get around all those “keyboard shortcuts”.
More seldom than not, even after two weeks of using it for basic day-to-day stuff, and changing a bunch of apps that came with it and delving in the configuration files, I was still pressing keys like I was young kid back at the Arcade trying to defeat Retsu with Ryu’s Hadoken… if ever I knew what was the key combo.
So mouse and keyboard is still a conquest of guys in my age… so why not use it?
As a long contributor to Gnome (translation work for PT_pt) and a long follower of Fedora, I opted to go this way and it is where I start my Step-by-step.
1- Fresh Fedora 43 install (skip this if you already have Fedora installed)
img1. fedoraproject.org website
Selecting a Linux distro is both hard and easy.
Hard as there are too many to choose from, and be certain, THERE IS NO BEST CHOICE, only personal choice (don’t mind what a lot of people say), but after choosing one, installation methods have progressed a lot (even for Arch there are installers)… no longer a slackware type of endeavor (except if you want to go that way). So don’t be afraid to try it. You will be surprised.
1.1. On your current system, Download the selected distro iso file (kind of a digital cd with all inside), I went with Fedora 43 workstation with GNOME as interface (DE)
1.2. Use an app to write it to a USB pen (this step depends where you are before installing linux)… I used Belena Etcher on windows to do this, and leave the pen in.
1.3. Start the computer and go to bios, and select the USB as boot disk
1.4. Follow the instructions to configure everything you need to use Linux. Embrace Linux and format the whole disk… lack of “safety net” will force you to really look into problem solving.
1.5. Restart and Login.
1.6. update your system via the software store… (From now on, I will mention commands issued for Fedora, if you opted for other Linux flavor, congratulations, but each system might have different software to do even the most basic stuff.. like installing software).
img2. Updating fedora from the GNOME Software application
CONGRATULATIONS #1 ! You now have an updated Linux installation and discovered one of the methods to install software in Linux…
2- Let’s start extending the base workstation config to make it a developer’s environment.
Until now, you never have seen the terminal… but have in mind… it is your friend… and as a developer… it will be one of your tools… let’s call it the “worktable” where you can use a bunch of tools.
img3. Opening the terminal in GNOME
2.1 Installing basic development tools.
Open the terminal (Super user and start typing terminal and press enter) and type this (type it, don’t copy it… you will be learning, mark my words!):
sudo dnf group install development-tools
SudoCalls in the power of the admin ™dnfit is the application used in Fedora to install stuff that comes packaged for the system. It is pre configured to fetch “packages” from software “warehouses” sanctioned by the Linux you opted for. (Other Linux flavors useapt-get,aur,pacmanbut they don’t differ much in the structure of the commands)group installInstall not only one package but install all the packages from a groupdevelopment-toolsName of the package group.
To work with Ruby and Rails, you will need also the yaml tools, so install this using the command:
sudo dnf install libyaml-devel
SudoCalls in the power of the admin ™dnfit is the application used to install stuff that comes packaged for the system, just like before.installInstall specific packages listed next (With all the tools needed for it to work- dependencies)libyaml-develThe name of the package that includes the YAML tools.
CONGRATULATIONS #2! You just mastered your second way of installing stuff into Linux!!! this is the preferred/official way, a universal method used to install sanctioned apps, prepared specifically for your Linux flavor available in allowed repositories (warehouses).
3- Now let’s focus in what we came here for… Ruby
3.1. OPTION a) Install Ruby language from Fedora repositories
(this is option a…please look lower for option b… you will learn more cool stuff :)).
There are several ways of installing Ruby. If I would ask you now to propose a way to do it… what would you propose?
I think you would go back up and see how to install a software package, and just do:
sudo dnf group install 'Ruby on Rails'
Congratulations. That is the way! or better yet, That is ONE way.
What this does is: goes to the package warehouse sanctioned by Fedora and installs the latest available packages with ruby and its dependencies It works. it is valid.
The thing is, this allows you to install ONE version of Ruby, and for now that is enough… BUT, in the future, you might get issues with this, when you are a well known developer, earning big bucks coding away… you might need to work on an old project, with older code, that newer versions of ruby don’t understand… and then it will be a mess. Let’s see another way:
3.2. OPTION b) install Ruby language with a version Manager.
The officially sanctioned app for this is, “MISE” according to official Rails guide:
To install “Mise”, the dnf way is not available, as Fedora does not package this specific application, nor it is available from the software store.
So we need a new method of installing software in Linux, you will need new tools for your worktable…
So first you need to see if it the curl tool is available in your system… for that you can type in the terminal:
curl --version
curlcURL transfers content from a specified URL. It uses a set of options that allow you to download stuff in a secure way (or not) and do operations with what you download…--versionasks for the installed version of curl
So to install Mise you need to type:
\curl -sSL https://mise.run | sh
\Everything in the terminal commands do something. This backslash forces the use of System’scurl, even if you have acurlapp on the directory you are working on, copied from another project, or bundled with other software this fetch the Legit command… the safe command…curlYou already know what it is-sSLare the options or “flags” forcurl-s— silent mode (no progress bar);-S— show errors even in silent mode-L— follow redirects
https://mise.runThis is the URL our tool will be calling to do whatever is to be done… in this casa is to quietly download any content (script) from https://mise.run and follows any redirects if necessary…
But it doesn’t end there, there is a second part after the…
- ** | ** “Pipes” or passes the downloaded script into something, because you do not only want to download something, but do next to additional tasks with it. In this case pass the content to…
- sh Shell, in Fedora’s case it is
bash(short for Bourne Again SHell ) and it is an interpreter to run all the instructions that come inside what you downloaded. Bash is one of the possible Shell and scripting languages used by Unix Operating Systems. (Sometimes there is the confusion between bash and terminal… but terminal defines the “window”, the visualization , the colors, and bash works at system level to perform tasks… It can be invoked from the terminal, and it shows the output of the commands in the terminal also, hence the confusion.
So, to put it bluntly curl gets a list of ingredients and recipe for a cake from a remote location, and pass it to our cook (called bash) to do the work that is listed there.
Now, If you follow the on screen instructions you will see that mise needs to be activated, so that every time you start a new shell/terminal, mise is to be activated… and it provides you the command you have to type:
echo 'eval "$(~/.local/bin/mise activate)"' >> ~/.bashrc
Let me change the order a bit for clarity:
echodoes exactly what you are thinking… “prints out to memory” like an echo what comes next inside the ’ ’>> ~/.bashrcand paste it into the bash configuration file
But what is inside that ’ ’ ?evalperforms the action that comes next~/.local/bin/mise activateactivate mise scripts with every bash session.
So this is a fancy way for editing a hidden file called .bashrc (that is what that initial dot stands for) and adding that specific line of code at the bottom, that activates mise everytime you start a bash shell.
Just reboot the shell session without closing it, reloading the file you just changed with previous step:
source ~/.bashrc
or just restart the terminal.
So… to see if mise was correctly installed we can do it two ways:
mise -v
or
mise doctor
Both will tell you if mise is correctly installed.
You should be looking into something like this now:
img4. Output of mise -v command, with mise version
CONGRATULATIONS #3! You just mastered another way to install stuff into Linux.
In reality you are not “installing” things directly, you are pulling the text contents of a specified URL, and passing it to bash to execute the commands inside, and then bash does the installation work for you… it is like, you are downloading a Cake recipe, and passing it to the Cook for him to do the cake following the instructions.
In this case it was the recipe to install the MISE cake.
And now you can say to Mise to use a Ruby version with the command:
mise use -g ruby@3
Note that if that specific version is not installed, mise will install it for you, and then start using it.
CONGRATULATIONS #4… you are now installing software with yet another tool. Isn’t Linux lovely?
How do you check ruby installation? by now you know how:
ruby -v
and you should see something like:
img5. Ruby version
3. Ruby on Rails…finally.
So until now you used as install methods:
- Using the “Software” store inside Gnome interface
dnfto install software from the fedora sanctioned repositories (warehouse)curlto download a set of instructions and pipe them into bash/gpg to install softwaremiseas a tool to install a specific ruby version/ allow to install multiple ones in the future
Don’t tell me of yet another way to install software…
Well… as a matter of fact…
Specifically for Ruby, you can create “ruby code” and package it as “GEMS”. it is a cute name, in tandem with the Ruby name. GEMS are then packages of ruby code that can be installed on any Ruby installation, in linux, macOS or windows, using yet another tool: gem
You have gems for a bunch of different things, and this includes a set of Ruby code that includes the complete RAILS framework
So to install the Ruby on Rails framework from a Ruby GEM just type:
gem install rails
This goes to the GEMS official repository and downloads the latest version of the necessary GEMs and installs them following the Ruby commands inside the GEM.
Finally just check if it is installed.
rails -v
CONGRATULATIONS #5! yes… not going to repeat myself. :D… It is all about having choices.
WHOORRAYYYYY!!! you now have installed everything you need to start coding.
4- Let’s try it all out… let’s create a new RAILS project:
Use the “files” application to create a directory where you will put all your projects… just call it “Projects” (mind the caps, “projects” is different from “Projects”.)
I bet you now prefer to use your new terminal skills… just type:
mkdir Projects
mkdircreates the sub directory with the name you specify (Projects) on the directory you are in. Usually it is your “home” directory, meaning your own space in the Linux installation…
To go into that directory type:
cd Projects
Notice that the text just before where you type the commands in the terminal has changed… saying exactly where you are… in my case it displays:
img6. My directory “Projects”
jpcarvalhinho@fedora:~/Projects$
< username > @ < computerName >: homeDirectory / Subdirectory… where homeDirectory is universally known as “~” and you can even reference it like that when giving commands.
So… now you are inside the “Projects” folder, let’s create a new RoR project using rails new and call it “This_is_my_first_project”.
TIP: As per recommendation, don’t use spaces. Some Linux commands don’t like spaces, so you should never use them. Replace them with “-” or “_”.
rails new This_is_my_first_project
If all goes well, and no errors are produced, you now have a sub directory called “This_is_my_first_project” inside the “Projects” sub directory with a bunch of rails generated files inside. So, type
ls
ls list contents of the current directory (/Projects)
But you can also list child directories contents by doing:
ls ~/Projects/This_is_my_first_project
… to list all the rails files inside the subdirectory /Projects/This_is_my_firts_project.
img7. Newly created Rails files inside my project directory.
ATTENTION: This is important: You just created a new rails project, with a specific set of code gems, with specific versions, opinions, configurations that are assumed to be the best ones for any starting project.
This means that from now on, when you want to interact with this specific instance of RoR project (This_is_my_first_project), and issue ruby commands you NEED TO BE INSIDE THE PROJECT’s DIRECTORY.
In fact, if you try any of the next commands outside the base directory of your project you will see they don’t work.
I have lost a bunch of hours understanding this fact, and trying to understand why “rails” commands didn’t work from “Projects” main directory. In fact, the only rails command that works is rails newso you can start a new project directory, to work from within.
5 - See the whole thing working!
Do you want to see it working? I know you do!
Navigate into the project directory:
cd ~/Projects/This_is_my_first_project
cdChange directory to…
and now type:
rails server
railslets do a rails operation called…serverthat starts a local webserver.
This starts a local webserver, that includes all the contents of this project, and this project alone. For every RoR project you have in your local disk, you need to run this.
You can open a browser window and type in the URL:
127.0.0.1: 9000
and see what is there, with the main software versions that are being used listed:
img8. The default content of a new RoR project
That’s it! This was all I learnt in a week, with countless headscratching, frustration and just plain feeling dumb at the end and finding a oh so simple solution/explanation.
Congratulations… I do hope you just did it in a couple of hours.
6- Conclusion
If you stood with me until the end you learnt:
- I am fifty years old
- how to install Linux (fedora)
- how to update it
- how to install software into linux using multiple ways
- how to install all the necessary tools to start a RoR project
- How to test drive a ror project and see it in your browser
- How good I am at congratulating you.
Next UP… either I set up a git profile and start coding my personal project and go reporting along the way, or I try first to go fedora Silverblue… this has some pretty neat twists, as Atomic or immutable Linux “prevents you” from installing software at system level, so DNF should not work properly. Or maybe explain what I learnt about Containers…
Next time… hopefully in a week!







