<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Bruno Queiroz</title>
    <description>The latest articles on DEV Community by Bruno Queiroz (@brunowmoreno).</description>
    <link>https://dev.to/brunowmoreno</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F217448%2F733fdceb-90cc-48d1-a44e-50be23c5cf37.jpg</url>
      <title>DEV Community: Bruno Queiroz</title>
      <link>https://dev.to/brunowmoreno</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/brunowmoreno"/>
    <language>en</language>
    <item>
      <title>Install Ruby and Rails on Fedora 40</title>
      <dc:creator>Bruno Queiroz</dc:creator>
      <pubDate>Mon, 06 May 2024 13:37:12 +0000</pubDate>
      <link>https://dev.to/brunowmoreno/install-ruby-and-rails-on-fedora-40-4bfb</link>
      <guid>https://dev.to/brunowmoreno/install-ruby-and-rails-on-fedora-40-4bfb</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg52gjpfce8aecuuivkqk.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg52gjpfce8aecuuivkqk.jpeg" alt="Ruby " width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
A few weeks ago I’ve had a problem about install the Ruby on Rails development environment on Fedora 39. First I try the same tutorial that I always use to install Rails on Ubuntu/Debian and similar distros, but I’ve had some problems. If you’re using some Debian based distribution I strong recommends this article:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gorails.com/setup/ubuntu/22.04" rel="noopener noreferrer"&gt;https://gorails.com/setup/ubuntu/22.04&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But if you’re a Fedora user, and this is the reason that you stay here, let’s go! Fedora have one of the most stable and simple to use package manager among the Linux world called “dnf”, something strong like that is the Pacman for Arch Linux. Ok, let’s setup our system.&lt;/p&gt;

&lt;p&gt;The first thing is obvious but stronger needed, update your system, so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf update &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The flag “-y” is the same thing to say “Yes” to install all the packages. Now let’s install some needed packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf &lt;span class="nb"&gt;install &lt;/span&gt;git curl automake gcc gcc-c++ kernel-devel libyaml-devel &lt;span class="nt"&gt;-y&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now everything in our system is ok to build and install our ruby versions! In the last two years I've been using "asdf" for multiple versions of languages like Ruby, Node and Elixir and for now I don't have any intention to change to another. To learn more about asdf:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://asdf-vm.com/" rel="noopener noreferrer"&gt;https://asdf-vm.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, now let’s install “asdf” on our system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd
&lt;/span&gt;git clone https://github.com/excid3/asdf.git ~/.asdf
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'. "$HOME/.asdf/asdf.sh"'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.bashrc
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'. "$HOME/.asdf/completions/asdf.bash"'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.bashrc
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'legacy_version_file = yes'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.asdfrc
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'export EDITOR="code --wait"'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.bashrc
&lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nv"&gt;$SHELL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we need to install the Ruby asdf plugin:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;asdf plugin add ruby
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To install Ruby and set the default version, we’ll run the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;asdf &lt;span class="nb"&gt;install &lt;/span&gt;ruby 3.3.1
asdf global ruby 3.3.1
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"gem: --no-document"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; ~/.gemrc
gem update &lt;span class="nt"&gt;--system&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ruby installed, let’s install rails:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gem &lt;span class="nb"&gt;install &lt;/span&gt;rails
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And now everything is ok, let’s make something awesome!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rails &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Until the future!&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>fedora</category>
      <category>asdf</category>
    </item>
  </channel>
</rss>
