<?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: Alexandre Calaça</title>
    <description>The latest articles on DEV Community by Alexandre Calaça (@alexandrecalaca).</description>
    <link>https://dev.to/alexandrecalaca</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%2F795109%2F9bf23429-1053-4890-909d-96e25f3a7327.jpeg</url>
      <title>DEV Community: Alexandre Calaça</title>
      <link>https://dev.to/alexandrecalaca</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alexandrecalaca"/>
    <language>en</language>
    <item>
      <title>How to undo a specific pushed commit</title>
      <dc:creator>Alexandre Calaça</dc:creator>
      <pubDate>Thu, 13 Feb 2025 17:00:20 +0000</pubDate>
      <link>https://dev.to/alexandrecalaca/how-to-undo-a-specific-pushed-commit-4jeg</link>
      <guid>https://dev.to/alexandrecalaca/how-to-undo-a-specific-pushed-commit-4jeg</guid>
      <description>&lt;h3&gt;
  
  
  Navigate to Your Repository:
&lt;/h3&gt;

&lt;p&gt;Open your terminal&lt;/p&gt;




&lt;h3&gt;
  
  
  Check the Status:
&lt;/h3&gt;

&lt;p&gt;Run the following command to ensure you have a clean working tree:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&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%2Fdf4xlc8xrl90epr5flji.png" 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%2Fdf4xlc8xrl90epr5flji.png" alt="Image Check the Status" width="537" height="63"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Find the Commit Hash:
&lt;/h3&gt;

&lt;p&gt;Each commit has a unique hash (e.g., 2c8451a). You need to find the hash of the commit you want to undo.&lt;/p&gt;

&lt;p&gt;You can do this in two ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;View the commit history on GitHub, Bitbucket, or another remote repository hosting service;&lt;/li&gt;
&lt;li&gt;View the commit history in the terminal&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's use the terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git log --oneline
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;/p&gt;

&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%2Fhaji2vs49fzjgsie0dds.png" 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%2Fhaji2vs49fzjgsie0dds.png" alt="Image Find the Commit Hash" width="800" height="160"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Revert the Commit:
&lt;/h3&gt;

&lt;p&gt;Once you have the commit hash, run the following command (replacing 2c8451a with the actual hash of your commit):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git revert 2c8451a --no-edit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;--no-edit&lt;/code&gt; option prevents Git from asking you to enter a commit message.&lt;/p&gt;

&lt;p&gt;OUtput&lt;/p&gt;

&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%2F5tni8hjqnjh4cbh3cl06.png" 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%2F5tni8hjqnjh4cbh3cl06.png" alt="Image Revert the Commit" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By following these steps, you will create a new commit that effectively undoes the specified commit while keeping your Git history intact.&lt;/p&gt;




&lt;h3&gt;
  
  
  Push the Reverted Changes
&lt;/h3&gt;

&lt;p&gt;if working with a remote repository):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push origin feature/branch-133
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will push the reverted commit to the remote repository, ensuring that others see the changes.&lt;/p&gt;




&lt;h3&gt;
  
  
  Double check
&lt;/h3&gt;

&lt;p&gt;In the terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git log --oneline
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;/p&gt;

&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%2F505h0tdt3pblk0zrkjsf.png" 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%2F505h0tdt3pblk0zrkjsf.png" alt="Image Double check" width="800" height="209"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Done
&lt;/h3&gt;




&lt;h3&gt;
  
  
  Final message
&lt;/h3&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>programming</category>
    </item>
    <item>
      <title>MBA em Desenvolvimento de Software Avançado com foco em Ruby on Rails</title>
      <dc:creator>Alexandre Calaça</dc:creator>
      <pubDate>Sat, 21 Dec 2024 20:50:06 +0000</pubDate>
      <link>https://dev.to/alexandrecalaca/mba-em-desenvolvimento-de-software-avancado-com-foco-em-ruby-on-rails-3plj</link>
      <guid>https://dev.to/alexandrecalaca/mba-em-desenvolvimento-de-software-avancado-com-foco-em-ruby-on-rails-3plj</guid>
      <description>&lt;p&gt;Caríssimos,&lt;/p&gt;

&lt;p&gt;Com o final do ano se aproximando, é um ótimo momento para refletirmos sobre tudo o que conquistamos e sonharmos com o que está por vir.&lt;/p&gt;

&lt;p&gt;Se você está pensando em dar um passo a mais na sua carreira em tecnologia, há uma equipe dedicada de profissionais que está comprometida em oferecer o melhor para nossos estudantes e para a comunidade Rails.&lt;/p&gt;




&lt;p&gt;É o O &lt;code&gt;MBA em Desenvolvimento de Software Avançado com foco em Ruby on Rails&lt;/code&gt;, &lt;a href="//mbaonrails.com.br"&gt;MBA on Rails&lt;/a&gt;, que foi cuidadosamente elaborado para atender às necessidades do mercado e preparar você para os desafios do mundo da tecnologia.&lt;/p&gt;

&lt;p&gt;Você será exposto a tópicos altamente relevantes, como segurança, otimização e performance, escalabilidade, AWS, DevOps, design patterns e arquitetura de software.&lt;/p&gt;

&lt;p&gt;Além disso, você terá a oportunidade de se conectar com uma rede de profissionais da indústria e participar de projetos práticos que fortalecerão suas habilidades, portfolio e confiança.&lt;/p&gt;




&lt;p&gt;A partir de hoje, 21 de Dezembro de 2024, &lt;strong&gt;faltam apenas 25 dias para o início das inscrições&lt;/strong&gt; do programa mais completo de Pós-Graduação Lato Sensu da América Latina, focado no ecossistema &lt;code&gt;Ruby on Rails&lt;/code&gt;!&lt;/p&gt;

&lt;p&gt;Não perca a chance de transformar sua carreira! Seja o primeiro a saber sobre a abertura das inscrições e o &lt;strong&gt;lançamento oficial em 15 de janeiro de 2025.&lt;/strong&gt;&lt;br&gt;
Link: &lt;a href="http://mbaonrails.com.br/signup" rel="noopener noreferrer"&gt;http://mbaonrails.com.br/signup&lt;/a&gt;&lt;/p&gt;




</description>
      <category>ruby</category>
      <category>rails</category>
      <category>development</category>
    </item>
    <item>
      <title>Vaga Desenvolvedor Backend - Ruby on Rails - AGROS</title>
      <dc:creator>Alexandre Calaça</dc:creator>
      <pubDate>Thu, 05 Dec 2024 17:02:54 +0000</pubDate>
      <link>https://dev.to/alexandrecalaca/vaga-desenvolvedor-backend-ruby-on-rails-4h84</link>
      <guid>https://dev.to/alexandrecalaca/vaga-desenvolvedor-backend-ruby-on-rails-4h84</guid>
      <description>&lt;p&gt;Post original da &lt;a href="https://grupoagros.rhgestor.com.br/vagas/detalhes/LqkA87O23200ekZBngz" rel="noopener noreferrer"&gt;vaga Desenvolvedor Backend - Ruby on Rails&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Descrição da Vaga
&lt;/h3&gt;

&lt;p&gt;O que você vai fazer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Desenvolver e manter sistemas utilizando Ruby on Rails.&lt;/li&gt;
&lt;li&gt;Criar e integrar APIs REST de alto desempenho.&lt;/li&gt;
&lt;li&gt;Trabalhar com bancos NOSQL, otimizando consultas e garantindo eficiência.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Post original da &lt;a href="https://grupoagros.rhgestor.com.br/vagas/detalhes/LqkA87O23200ekZBngz" rel="noopener noreferrer"&gt;vaga Desenvolvedor Backend - Ruby on Rails&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Requisitos Desejáveis
&lt;/h3&gt;

&lt;p&gt;Conhecimentos em javascript, typescript e NodeJS&lt;/p&gt;

&lt;p&gt;Post original da &lt;a href="https://grupoagros.rhgestor.com.br/vagas/detalhes/LqkA87O23200ekZBngz" rel="noopener noreferrer"&gt;vaga Desenvolvedor Backend - Ruby on Rails&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Regime de Contratação
&lt;/h3&gt;

&lt;p&gt;CLT&lt;/p&gt;

&lt;p&gt;Post original da &lt;a href="https://grupoagros.rhgestor.com.br/vagas/detalhes/LqkA87O23200ekZBngz" rel="noopener noreferrer"&gt;vaga Desenvolvedor Backend - Ruby on Rails&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  PCD
&lt;/h3&gt;

&lt;p&gt;INDIFERENTE&lt;/p&gt;




&lt;h3&gt;
  
  
  Benefícios
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Auxilio Educação;&lt;/li&gt;
&lt;li&gt;Plano de Saúde Unimed;&lt;/li&gt;
&lt;li&gt;Seguro de vida;&lt;/li&gt;
&lt;li&gt;Vale Alimentação;&lt;/li&gt;
&lt;li&gt;Ambiente colaborativo e de aprendizado contínuo;&lt;/li&gt;
&lt;li&gt;Oportunidade de crescimento profissional;&lt;/li&gt;
&lt;li&gt;Projetos inovadores e desafiadores.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Post original da &lt;a href="https://grupoagros.rhgestor.com.br/vagas/detalhes/LqkA87O23200ekZBngz" rel="noopener noreferrer"&gt;vaga Desenvolvedor Backend - Ruby on Rails&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>career</category>
    </item>
    <item>
      <title>Vaga Desenvolvedor Jr - Ruby on Rails - Híbrido</title>
      <dc:creator>Alexandre Calaça</dc:creator>
      <pubDate>Thu, 05 Dec 2024 16:53:09 +0000</pubDate>
      <link>https://dev.to/alexandrecalaca/vaga-desenvolvedor-jr-ruby-on-rails-hibrido-554a</link>
      <guid>https://dev.to/alexandrecalaca/vaga-desenvolvedor-jr-ruby-on-rails-hibrido-554a</guid>
      <description>&lt;p&gt;Post de divulgação para a vaga &lt;a href="https://pitzi.gupy.io/job/eyJqb2JJZCI6ODExMDAwMSwic291cmNlIjoibGlua2VkaW4ifQ==?jobBoardSource=devtoalexandrecalaca" rel="noopener noreferrer"&gt;Desenvolvedor Jr - Ruby on Rails&lt;/a&gt;, &lt;/p&gt;

&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%2F3qdi07u9j3ri6dttyu8e.png" 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%2F3qdi07u9j3ri6dttyu8e.png" alt="Image Basic info" width="665" height="106"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Descrição da vaga
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Somos a Pitzi, a proteção para celulares mais completa do mercado!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;São mais de 12 anos de experiência e 2.5 milhões de aparelhos protegidos, resultado de um conceito de negócio inovador! Recentemente, a Pitzi e a Leapfone se conectaram para oferecer um novo jeito de ter um smartphone com mensalidades acessíveis e proteção completa.&lt;/p&gt;

&lt;p&gt;Pessoas, transparência e tecnologia. Esse é o nosso combustível.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pitzi.gupy.io/job/eyJqb2JJZCI6ODExMDAwMSwic291cmNlIjoibGlua2VkaW4ifQ==?jobBoardSource=alexandrecalaca" rel="noopener noreferrer"&gt;Post original da vaga aqui.&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Por que a Pitzi?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Somos mais de 160 Pitziers, formando um time de alto nível, com propósito de autodesenvolvimento e voltado à estratégia de Cliente no Centro;&lt;/li&gt;
&lt;li&gt;Trabalhamos juntos na construção de um ambiente tecnológico, dinâmico e diverso.&lt;/li&gt;
&lt;li&gt;E, claro, somos uma empresa GPTW - Great Place to Work, certificação que identifica as melhores empresas para se trabalhar no Brasil e no mundo. &lt;/li&gt;
&lt;li&gt;Os nossos valores guiam todas as nossas decisões. Eles estão presentes nas estratégias, projetos e no dia a dia dos Pitziers: Focamos no cliente; Sonhamos grande; Sem risco, sem graça; Amamos pareto; Somos essencialistas; Mandamos a real; Colocamos a mão na massa; Assumimos a responsa; Um por todos e todos por um; Valorizamos impacto.&lt;/li&gt;
&lt;li&gt;Queremos pluralidade e entendemos os benefícios da diversidade. Por isso, aqui na Pitzi, todos podem ser exatamente quem são, sem qualquer distinção, a todo o momento. #DiversidadePitzi #VemPraPitzi.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://pitzi.gupy.io/job/eyJqb2JJZCI6ODExMDAwMSwic291cmNlIjoibGlua2VkaW4ifQ==?jobBoardSource=alexandrecalaca" rel="noopener noreferrer"&gt;Post original da vaga aqui.&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Contratação CLT + Benefícios:
&lt;/h3&gt;

&lt;p&gt;🍎 Flash (cartão flexível) com a recarga média de R$ 700/mês; &lt;br&gt;
💰 Antecipação de Salário&lt;br&gt;
😎 Uma folga no mês de aniversário;&lt;br&gt;
🍕 Eventos de descompressão na sexta-feira;&lt;br&gt;
🚑 Plano de Saúde Sul América;&lt;br&gt;
🦷 Plano Odontológico Sul América;&lt;br&gt;
💙 Seguro de Vida Prudential;&lt;br&gt;
🏋🏽‍♂️ Gympass;&lt;br&gt;
🏃 TotalPass;&lt;br&gt;
👶🏼 Auxílio Creche;&lt;br&gt;
👩🏻‍🍼 Licença maternidade estendida 180 dias;&lt;br&gt;
👨🏻‍🍼 Licença paternidade estendida 30 dias;&lt;br&gt;
👨‍👨‍👧 Licença parental estendida 120 dias;&lt;br&gt;
🏊🏻‍♀️ Sesc SP;&lt;br&gt;
💆💆‍♂️Quick Massage&lt;br&gt;
📲 Proteção total Pitzi;&lt;br&gt;
👩🏻‍🚀Facilitação na adesão Leapfone;&lt;br&gt;
🛍️ Facilitação na adesão de celular e produtos Pitzi;&lt;br&gt;
📚 Pitzi Academy – cursos focados no desenvolvimento de soft skills e hard skills;&lt;br&gt;
📝Consultoria Financeira;&lt;br&gt;
💸 Crédito Consignado Creditas;&lt;br&gt;
💰 Bônus anual&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pitzi.gupy.io/job/eyJqb2JJZCI6ODExMDAwMSwic291cmNlIjoibGlua2VkaW4ifQ==?jobBoardSource=alexandrecalaca" rel="noopener noreferrer"&gt;Post original da vaga aqui.&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Responsabilidades e atribuições
&lt;/h3&gt;

&lt;p&gt;• Procuramos sempre escrever código limpo (fácil de entender, modificar, estender e testar)&lt;br&gt;
• Procuramos cuidar do código como um jardim, sempre tentando deixar melhor do que encontramos&lt;br&gt;
• Fazemos Code review por Pull Requests (PR)&lt;br&gt;
• Usamos boas práticas de engenharia + metodologias ágeis&lt;br&gt;
• Usamos o conceito de MVP em features. Colocamos no ar o mínimo para ser usado e validado&lt;br&gt;
• Estamos sempre abertos a receber críticas construtivas sobre o código&lt;br&gt;
• Buscamos a melhoria contínua em todos os processos&lt;br&gt;
• Ser ágil está em nosso DNA.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pitzi.gupy.io/job/eyJqb2JJZCI6ODExMDAwMSwic291cmNlIjoibGlua2VkaW4ifQ==?jobBoardSource=alexandrecalaca" rel="noopener noreferrer"&gt;Post original da vaga aqui.&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Requisitos e qualificações
&lt;/h3&gt;

&lt;p&gt;Trabalhamos aqui com:&lt;br&gt;
• Ruby / Ruby on Rails / Ruby on Jets&lt;br&gt;
• JavaScript&lt;br&gt;
• Testes Automatizados&lt;br&gt;
• Sistemas de Banco de Dados Relacional&lt;br&gt;
• Infraestrutura Cloud-Based (AWS)&lt;/p&gt;

&lt;p&gt;Experiência profissional nas tecnologias acima será considerado um diferencial, porém também valorizamos o conhecimento adquirido através de estudos. Não deixe de se candidatar se ainda não tiver trabalhado com alguma delas, adoramos ensinar e formar novos profissionais.&lt;/p&gt;




&lt;h3&gt;
  
  
  Etapas do processo
&lt;/h3&gt;

&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%2Fm9tz28bt67r5vxhqzew1.png" 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%2Fm9tz28bt67r5vxhqzew1.png" alt="Image Etapas do processo" width="342" height="216"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;A Pitzi nasceu em 2012 com a missão de revolucionar o mercado de proteção para celular no Brasil.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ao lado de varejistas parceiros, oferecemos a proteção de celular mais completa do mercado, com transparência e velocidade. Utilizamos tecnologia de ponta e uma abordagem inovadora para simplificar o processo de contratação e gerenciamento de proteção para smartphones, proporcionando uma experiência ímpar e totalmente digital aos clientes.&lt;/p&gt;

&lt;p&gt;São mais de 2 milhões de aparelhos protegidos, 2 mil pontos de vendas em todo o país e 150 Pitziers apaixonados por inovação.&lt;/p&gt;

&lt;p&gt;Pessoas, transparência e tecnologia. Esse é o nosso combustível.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>career</category>
    </item>
    <item>
      <title>How to Switch Your Rails Application Database from PostgreSQL to SQLite</title>
      <dc:creator>Alexandre Calaça</dc:creator>
      <pubDate>Thu, 28 Nov 2024 18:43:25 +0000</pubDate>
      <link>https://dev.to/alexandrecalaca/how-to-switch-your-rails-application-database-from-postgresql-to-sqlite-59ip</link>
      <guid>https://dev.to/alexandrecalaca/how-to-switch-your-rails-application-database-from-postgresql-to-sqlite-59ip</guid>
      <description>&lt;p&gt;When working on a &lt;code&gt;Rails&lt;/code&gt; project, there might be scenarios where you want to switch your database from &lt;code&gt;PostgreSQL&lt;/code&gt; to &lt;code&gt;SQLite&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SQLite&lt;/code&gt; is lightweight, requires no server setup, and is a great choice for development or small-scale projects. This guide walks you through the process step-by-step.&lt;/p&gt;




&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Changing your database in a Rails project can seem daunting, but &lt;code&gt;Rails&lt;/code&gt;’ flexibility makes it a straightforward task. By following these steps, you'll seamlessly transition from &lt;code&gt;PostgreSQL&lt;/code&gt; to &lt;code&gt;SQLite&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Update the &lt;code&gt;Gemfile&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;First, replace the PostgreSQL gem (&lt;code&gt;pg&lt;/code&gt;) with the SQLite gem (&lt;code&gt;sqlite3&lt;/code&gt;) in your Gemfile. Here’s how:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Remove or comment out:
# gem 'pg'

# Add:
gem 'sqlite3', '~&amp;gt; 1.4'

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once updated, run the following command to install the new dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bundle install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;/p&gt;

&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%2Ffyat9wwtkl0bb4xxxfds.png" 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%2Ffyat9wwtkl0bb4xxxfds.png" alt="Image Update the Gemfile" width="800" height="102"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Update the database configuration
&lt;/h3&gt;

&lt;p&gt;Next, update your &lt;code&gt;config/database.yml&lt;/code&gt; file to configure &lt;code&gt;SQLite&lt;/code&gt; as your database adapter. Here's an example configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;default: &amp;amp;default
  adapter: sqlite3
  pool: &amp;lt;%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %&amp;gt;
  timeout: 5000

development:
  &amp;lt;&amp;lt;: *default
  database: db/development.sqlite3

test:
  &amp;lt;&amp;lt;: *default
  database: db/test.sqlite3

production:
  &amp;lt;&amp;lt;: *default
  database: db/production.sqlite3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration defines &lt;code&gt;SQLite&lt;/code&gt; as the adapter for all environments (development, test, and production).&lt;/p&gt;




&lt;h3&gt;
  
  
  Update dependencies
&lt;/h3&gt;

&lt;p&gt;Ensure that your application code doesn’t use PostgreSQL-specific features (like uuid, JSONB fields, or specific SQL queries). Refactor where necessary.&lt;/p&gt;

&lt;p&gt;SQLite has different capabilities compared to &lt;code&gt;PostgreSQL&lt;/code&gt;. You’ll need to ensure your application doesn’t rely on PostgreSQL-specific features such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;UUIDs&lt;/code&gt;: Replace UUID columns with standard IDs or compatible alternatives.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;JSONB&lt;/code&gt; fields: Use regular text columns or serialize data into a string format.&lt;/li&gt;
&lt;li&gt;Custom PostgreSQL Queries: Rewrite queries to be compatible with SQLite.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Carefully review your application code and migrations for any PostgreSQL-specific features and refactor as needed.&lt;/p&gt;




&lt;h3&gt;
  
  
  Run dependencies
&lt;/h3&gt;

&lt;p&gt;After updating the &lt;code&gt;Gemfile&lt;/code&gt;, ensure all the required gems are installed by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bundle install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;/p&gt;

&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%2Fii6hyot5ld1ctdvde6up.png" 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%2Fii6hyot5ld1ctdvde6up.png" alt="Image Run dependencies" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Re-create the structure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rails db:create
rails db:migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;/p&gt;

&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%2F8i610xtfjwgs861zkj0b.png" 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%2F8i610xtfjwgs861zkj0b.png" alt="Image Re-create the structure" width="800" height="614"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Test your application
&lt;/h3&gt;

&lt;p&gt;With everything set up, start your Rails server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rails server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Test your application thoroughly to ensure everything works as expected. Be mindful of any features or queries that may behave differently in &lt;code&gt;SQLite&lt;/code&gt; compared to &lt;code&gt;PostgreSQL&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Switching your Rails project from &lt;code&gt;PostgreSQL&lt;/code&gt; to SQLite can simplify your setup for development or small-scale applications.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SQLite’s&lt;/code&gt; lightweight and serverless design makes it ideal for quick iterations and testing. While PostgreSQL excels in production environments, SQLite shines when simplicity and portability are key.&lt;/p&gt;




&lt;h3&gt;
  
  
  Done
&lt;/h3&gt;




&lt;h3&gt;
  
  
  Let's network
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/alexcalaca" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/alexandrecalacaofficial/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;br&gt;
&lt;a href="https://dev.to/alexandrecalaca"&gt;Dev.to&lt;/a&gt;&lt;/p&gt;




</description>
      <category>ruby</category>
      <category>rails</category>
      <category>webdev</category>
      <category>alexandrecalaca</category>
    </item>
    <item>
      <title>How to clean up repetitive keys in .html.erb templates?</title>
      <dc:creator>Alexandre Calaça</dc:creator>
      <pubDate>Mon, 18 Nov 2024 20:40:55 +0000</pubDate>
      <link>https://dev.to/alexandrecalaca/how-to-clean-up-repetitive-keys-in-htmlerb-templates-1c8b</link>
      <guid>https://dev.to/alexandrecalaca/how-to-clean-up-repetitive-keys-in-htmlerb-templates-1c8b</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Handling translations in a Rails app is an essential part of creating scalable and maintainable software, especially when supporting multiple languages.&lt;/p&gt;

&lt;p&gt;However, as your templates become more complex, repeatedly writing long translation keys can quickly clutter your code. It’s frustrating, harder to read, and of course, prone to mistakes. &lt;/p&gt;

&lt;p&gt;Wouldn't it be great if there were a way to simplify this while keeping your templates clean and maintainable? Good news—there is!&lt;/p&gt;




&lt;h3&gt;
  
  
  Situation
&lt;/h3&gt;

&lt;p&gt;I found myself in exactly this situation. While working on a &lt;code&gt;.html.erb&lt;/code&gt; file, I noticed that a single long locale translation prefix was repeated over and over.&lt;/p&gt;

&lt;p&gt;The result? A cluttered, hard-to-read template that felt unnecessarily verbose. I wanted to make it cleaner and more readable.&lt;/p&gt;




&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;Anyway, let's get down to business.&lt;/p&gt;

&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%2F0pkdgu72zjgdi05wnw2a.png" 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%2F0pkdgu72zjgdi05wnw2a.png" alt="Image drink milk" width="280" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Sample file
&lt;/h3&gt;

&lt;p&gt;Let’s start with a typical &lt;code&gt;.html.erb&lt;/code&gt; file where a long translation key prefix is repeated multiple times.&lt;/p&gt;

&lt;p&gt;Here’s a snippet that might look familiar if you’ve worked on Rails apps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;%# app/views/mailers/sample_mailer.html.erb %&amp;gt;
&amp;lt;table bgcolor="#FFF" align="center" width="600" class="email-body" cellspacing="0" cellpadding="0"&amp;gt;
  &amp;lt;tbody&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;td align="left" bgcolor="#FFF"&amp;gt;
        &amp;lt;h2&amp;gt;
          &amp;lt;%= t('mailers.sample_mailer.welcome_email.title') %&amp;gt;
        &amp;lt;/h2&amp;gt;
      &amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;td align="left" bgcolor="#FFF"&amp;gt;
        &amp;lt;p&amp;gt;
          &amp;lt;%= t('mailers.sample_mailer.welcome_email.subtitle', user_name: @user.name) %&amp;gt;
        &amp;lt;/p&amp;gt;
      &amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;td align="left" bgcolor="#FFF"&amp;gt;
        &amp;lt;p&amp;gt;
          &amp;lt;%= t('mailers.sample_mailer.welcome_email.body', plan_name: @user.plan_name) %&amp;gt;
        &amp;lt;/p&amp;gt;
      &amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;td align="left" bgcolor="#FFF"&amp;gt;
        &amp;lt;small&amp;gt;
          &amp;lt;%= t('mailers.sample_mailer.welcome_email.footer') %&amp;gt;
        &amp;lt;/small&amp;gt;
      &amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
  &amp;lt;/tbody&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this simple example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;translation key prefix&lt;/strong&gt;: &lt;code&gt;mailers.sample_mailer.welcome_email&lt;/code&gt; is repeated in every call to &lt;code&gt;t&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code Clutter&lt;/strong&gt;: The repetitive prefix makes the template unnecessarily verbose.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Error-Prone&lt;/strong&gt;: If the prefix changes, you’d have to update it everywhere, increasing the risk of mistakes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This approach works, but as the number of translations increases, it quickly becomes a maintenance nightmare.&lt;/p&gt;




&lt;h3&gt;
  
  
  The &lt;code&gt;prefix&lt;/code&gt; approach
&lt;/h3&gt;

&lt;p&gt;In order to accomplish this, we're going to use the following as a local variable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;% prefix = 'mailers.sample_mailer.welcome_email' %&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We assigned the common part of the translation key (&lt;code&gt;mailers.sample_mailer.welcome_email&lt;/code&gt;) to a variable called &lt;code&gt;prefix&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;By defining the common translation key prefix in a variable or directly in the &lt;code&gt;t&lt;/code&gt; helper, you can dramatically clean up your &lt;code&gt;.html.erb&lt;/code&gt; templates.&lt;/p&gt;




&lt;h3&gt;
  
  
  Make it happen
&lt;/h3&gt;

&lt;p&gt;Here’s the same &lt;code&gt;.html.erb&lt;/code&gt; file after applying the prefix solution:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;% prefix = 'mailers.sample_mailer.welcome_email' %&amp;gt;
&amp;lt;table bgcolor="#FFF" align="center" width="600" class="email-body" cellspacing="0" cellpadding="0"&amp;gt;
  &amp;lt;tbody&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;td align="left" bgcolor="#FFF"&amp;gt;
        &amp;lt;h2&amp;gt;
          &amp;lt;%= t("#{prefix}.title") %&amp;gt;
        &amp;lt;/h2&amp;gt;
      &amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;td align="left" bgcolor="#FFF"&amp;gt;
        &amp;lt;p&amp;gt;
          &amp;lt;%= t("#{prefix}.subtitle", user_name: @user.name) %&amp;gt;
        &amp;lt;/p&amp;gt;
      &amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;td align="left" bgcolor="#FFF"&amp;gt;
        &amp;lt;p&amp;gt;
          &amp;lt;%= t("#{prefix}.body", plan_name: @user.plan_name) %&amp;gt;
        &amp;lt;/p&amp;gt;
      &amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;td align="left" bgcolor="#FFF"&amp;gt;
        &amp;lt;small&amp;gt;
          &amp;lt;%= t("#{prefix}.footer") %&amp;gt;
        &amp;lt;/small&amp;gt;
      &amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
  &amp;lt;/tbody&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why the `prefix approach
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Cleaner Templates: Your &lt;code&gt;.html.erb&lt;/code&gt; files become significantly less verbose.&lt;/li&gt;
&lt;li&gt;Easier Maintenance: Updating a prefix is quick and straightforward.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Done
&lt;/h3&gt;




&lt;h3&gt;
  
  
  Let's network
&lt;/h3&gt;

&lt;p&gt;&lt;a href="//github.com/alexcalaca"&gt;Github&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/alexandrecalacaofficial/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;br&gt;
&lt;a href="https://dev.to/alexandrecalaca"&gt;Dev.to&lt;/a&gt;&lt;/p&gt;




</description>
      <category>webdev</category>
      <category>ruby</category>
      <category>rails</category>
      <category>alexandrecalaca</category>
    </item>
    <item>
      <title>Ruby: One of the top 5 highest-paying technologies, according to Stack overflow</title>
      <dc:creator>Alexandre Calaça</dc:creator>
      <pubDate>Sat, 16 Nov 2024 04:51:13 +0000</pubDate>
      <link>https://dev.to/alexandrecalaca/ruby-one-of-the-top-5-highest-paying-technologies-according-to-stack-overflow-5dc7</link>
      <guid>https://dev.to/alexandrecalaca/ruby-one-of-the-top-5-highest-paying-technologies-according-to-stack-overflow-5dc7</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;In the world of software development, &lt;code&gt;Ruby&lt;/code&gt; has a unique charm that’s kept it relevant and in demand for years. Known for its focus on simplicity and &lt;strong&gt;developer happiness&lt;/strong&gt;, Ruby powers some of the world’s most popular websites and applications, making it a language that doesn’t just get the job done but makes coding genuinely enjoyable.&lt;/p&gt;

&lt;p&gt;Year after year, &lt;code&gt;Ruby&lt;/code&gt; continues to rank among the highest-paying technologies globally, and it’s not hard to see why. Beyond its elegant syntax and the powerful Ruby on Rails framework, Ruby appeals to a wide range of businesses looking for efficient, well-crafted code—and they’re willing to pay top dollar for it.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Competitive Landscape for Tech Salaries
&lt;/h3&gt;

&lt;p&gt;In the fast-paced world of technology, programming languages rise and fall in popularity as new ones emerge, specialized for unique tasks or optimized for performance. In recent years, languages like &lt;code&gt;Clojure&lt;/code&gt;, &lt;code&gt;Perl&lt;/code&gt;, and &lt;code&gt;Zig&lt;/code&gt; have consistently ranked at the top in terms of salary, alongside established languages like &lt;code&gt;Ruby&lt;/code&gt;. These high salaries are often a direct reflection of each language’s demand, the scarcity of skilled developers, and the specific value they offer to organizations.&lt;/p&gt;

&lt;p&gt;For example, &lt;code&gt;Clojure&lt;/code&gt; and &lt;code&gt;Zig&lt;/code&gt; may not have the same mainstream appeal as &lt;code&gt;JavaScript&lt;/code&gt; or Python, but they’re highly valued for specialized roles that require advanced performance or functional programming capabilities. This demand creates a smaller, competitive job market, where companies pay a premium for expertise that can help solve complex problems or deliver cutting-edge solutions.&lt;/p&gt;

&lt;p&gt;Salaries in the tech industry can tell us a lot about the market forces at play. High compensation often signals that a technology requires deep expertise, is less commonly known, or has a significant impact on an organization’s efficiency or product.&lt;/p&gt;

&lt;p&gt;In this competitive landscape, &lt;code&gt;Ruby&lt;/code&gt;’s consistently high salaries suggest it remains indispensable to many organizations, particularly in fields like web development and startups. The continued willingness to invest in Ruby developers, even as newer languages emerge, speaks to &lt;strong&gt;Ruby’s staying power&lt;/strong&gt; and the value it brings to projects that prioritize developer productivity and rapid iteration.&lt;/p&gt;




&lt;h3&gt;
  
  
  Ruby salary data
&lt;/h3&gt;

&lt;p&gt;According to the Developer Survey conducted annually by the most respected programming resource, &lt;code&gt;stackoverflow&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Stack Overflow&lt;/code&gt;’s annual Developer Survey is the largest and most comprehensive survey of people who code around the world.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2019&lt;/li&gt;
&lt;/ul&gt;

&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%2Fvssdx24taujyjz03waw4.png" 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%2Fvssdx24taujyjz03waw4.png" alt="Image Ruby salary data 2019" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2020&lt;/li&gt;
&lt;/ul&gt;

&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%2Fjkbrq1mav7t07d64kw2z.png" 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%2Fjkbrq1mav7t07d64kw2z.png" alt="Image Ruby salary data 2020" width="800" height="578"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2021&lt;/li&gt;
&lt;/ul&gt;

&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%2Fx459f1uet294cfq7gqr0.png" 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%2Fx459f1uet294cfq7gqr0.png" alt="Image Ruby salary data 2021" width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2022&lt;/li&gt;
&lt;/ul&gt;

&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%2Fxgs7rrz3jzq0p000byfe.png" 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%2Fxgs7rrz3jzq0p000byfe.png" alt="Image Ruby salary data 2022" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2023&lt;/li&gt;
&lt;/ul&gt;

&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%2Fkuu3mo5cdrbhbddc5yhl.png" 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%2Fkuu3mo5cdrbhbddc5yhl.png" alt="Image Ruby salary data 2023" width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take a look at the references section if you want to double check the data.&lt;/p&gt;




&lt;h3&gt;
  
  
  Ruby Salary Trends: 2019-2023
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;2019: 6th highest salary globally, at $75k, with a $15k gap from the highest (Clojure).&lt;/li&gt;
&lt;li&gt;2020: 5th place with $71k, narrowing the gap to $5k from Perl, the highest-paid language.&lt;/li&gt;
&lt;li&gt;2021: Returns to 6th at $80k, with a $15k gap from the top (Clojure).&lt;/li&gt;
&lt;li&gt;2022: Climbs to 5th at $93k, with a $13k gap from the highest (Clojure).&lt;/li&gt;
&lt;li&gt;2023: Reaches 4th with nearly $99k, narrowing the gap to $4k from the highest (Zig).&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Data breakdown
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Consistent High Ranking
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;Ruby’s&lt;/code&gt; steady position among the top 10 highest-paying technologies from 2019 to 2023 highlights its enduring value in the tech world.&lt;/p&gt;

&lt;p&gt;Despite a rapidly changing landscape filled with emerging languages and tools, Ruby has consistently held strong, maintaining a &lt;strong&gt;rank between 4th and 6th place globally&lt;/strong&gt;. This high ranking isn’t just a matter of coincidence—it reflects the steady demand for Ruby expertise across a variety of industries.&lt;/p&gt;

&lt;p&gt;The fact that Ruby has remained highly paid over several years suggests a level of trust and reliance from companies, especially in sectors like web development, e-commerce, and tech startups, where Ruby on Rails has become a go-to framework for building robust applications quickly.&lt;/p&gt;

&lt;p&gt;Businesses that rely on Ruby are often focused on developer productivity, maintainability, and the ability to bring applications to market smoothly.&lt;/p&gt;

&lt;p&gt;This consistent ranking demonstrates that Ruby isn’t just a temporary trend; &lt;strong&gt;it’s a mature and reliable choice for companies who value efficiency, scalability, and developer satisfaction&lt;/strong&gt;. &lt;/p&gt;




&lt;h4&gt;
  
  
  Steady Salary Increase
&lt;/h4&gt;

&lt;p&gt;Ruby has seen a noticeable rise in average salaries over the past few years, reflecting its sustained demand and relevance in the tech industry. From 2019 to 2023, &lt;code&gt;Ruby&lt;/code&gt; developer salaries steadily climbed, starting at $75k and reaching nearly $99k.&lt;/p&gt;

&lt;p&gt;This consistent trajectory is a strong indicator that companies recognize and are willing to pay for Ruby’s unique benefits, especially as experienced Ruby developers remain highly valued across many sectors.&lt;/p&gt;

&lt;p&gt;These salary increases aren’t just about inflation—they reflect the strategic importance of Ruby in areas like web application development, where speed and efficiency are necessary. &lt;code&gt;Ruby&lt;/code&gt;’s ability to help teams build high-quality, scalable applications quickly makes it a favorite in industries where time-to-market and agility are essential.&lt;/p&gt;

&lt;p&gt;As more companies see the value of Ruby’s productivity-focused design, demand for skilled developers continues to rise, and salaries follow suit.&lt;/p&gt;

&lt;p&gt;For developers, this steady salary growth offers an encouraging outlook. Whether you’re new to Ruby or a seasoned expert, the market’s consistent investment in Ruby skills suggests that learning and mastering the language can lead to increasingly rewarding career opportunities. It’s a clear signal that the language remains valuable, even as new technologies emerge.&lt;/p&gt;




&lt;h4&gt;
  
  
  Narrowing Salary Gap with Top Technologies
&lt;/h4&gt;

&lt;p&gt;One of the most striking trends in recent years is &lt;code&gt;Ruby&lt;/code&gt;’s steady approach to the top of the tech salary charts. In 2019, the gap between &lt;code&gt;Ruby&lt;/code&gt; developers and those working with the highest-paying technology was around $15,000.&lt;/p&gt;

&lt;p&gt;Fast-forward to 2023, and that gap has shrunk to just about $4,000. This narrowing gap tells an interesting story about &lt;code&gt;Ruby&lt;/code&gt;’s place in the tech landscape: it’s a language that continues to grow in competitiveness and value, even as new, highly specialized languages enter the market.&lt;/p&gt;

&lt;p&gt;For developers, this trend is promising. It indicates that &lt;code&gt;Ruby&lt;/code&gt;, despite being a more established language, remains as financially rewarding as many newer alternatives. This speaks to its adaptability, robust ecosystem, and the &lt;strong&gt;strong developer community that continues to advance the language&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Companies clearly recognize that hiring skilled Ruby developers brings long-term value, and as they compete to attract top talent, salaries have risen accordingly.&lt;/p&gt;

&lt;p&gt;Ultimately, this narrowing gap highlights that &lt;code&gt;Ruby&lt;/code&gt; is a strategic choice for developers seeking both high compensation and diverse opportunities, affirming that it’s not only relevant but also competitive at the highest levels in today’s job market.&lt;/p&gt;




&lt;h3&gt;
  
  
  Why Ruby?
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Developer Productivity and Happiness
&lt;/h4&gt;

&lt;p&gt;One of &lt;code&gt;Ruby&lt;/code&gt;’s core philosophies is to make coding a pleasant and productive experience. The language was designed with simplicity and readability in mind, allowing developers to write clear, concise code that’s easy to understand and maintain.&lt;/p&gt;

&lt;p&gt;This focus on developer happiness has made Ruby especially popular in environments that prioritize rapid iteration, such as tech startups and agile development teams.&lt;/p&gt;

&lt;p&gt;By reducing the cognitive load on developers and speeding up the coding process, Ruby allows teams to focus on building impactful features rather than getting stuck in syntax or overly complex structures.&lt;/p&gt;




&lt;h4&gt;
  
  
  Loyal community
&lt;/h4&gt;

&lt;p&gt;A key factor behind &lt;code&gt;Ruby&lt;/code&gt;’s success is its loyal community and the extensive resources this network has cultivated over the years. &lt;code&gt;Ruby&lt;/code&gt; has been around long enough to develop a vast ecosystem filled with powerful libraries, versatile plugins, and thorough documentation.&lt;/p&gt;

&lt;p&gt;This community-driven support system provides developers with everything they need to succeed—from robust tools and educational content to networking opportunities and collaborative projects, such as Meetups and &lt;a href="https://www.tropicalonrails.com/" rel="noopener noreferrer"&gt;Tropical Rails&lt;/a&gt; in Brazil.&lt;/p&gt;

&lt;p&gt;One of &lt;code&gt;Ruby&lt;/code&gt;’s greatest assets is the continued popularity of Ruby on Rails, which has been widely adopted for building reliable, scalable applications. The &lt;code&gt;Ruby&lt;/code&gt; community actively contributes to Rails and the language itself, consistently introducing updates, best practices, and new features.&lt;/p&gt;

&lt;p&gt;This collaborative environment attracts both new talent and experienced developers, while offering companies confidence in the language’s long-term viability and stability.&lt;/p&gt;

&lt;p&gt;For businesses, hiring &lt;code&gt;Ruby&lt;/code&gt; developers means accessing not only technical expertise but also a community that has made Ruby development faster, easier, and more reliable. &lt;/p&gt;




&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://survey.stackoverflow.co/2023/#technology-top-paying-technologies" rel="noopener noreferrer"&gt;2023 Top paying technologies&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://survey.stackoverflow.co/2022/#section-top-paying-technologies-top-paying-technologies" rel="noopener noreferrer"&gt;2022 Top paying technologies&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://survey.stackoverflow.co/2021#section-top-paying-technologies-top-paying-technologies" rel="noopener noreferrer"&gt;2021 Top paying technologies&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://survey.stackoverflow.co/2020#top-paying-technologies" rel="noopener noreferrer"&gt;2020 Top paying technologies&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://survey.stackoverflow.co/2019#technology-_-what-languages-are-associated-with-the-highest-salaries-worldwide" rel="noopener noreferrer"&gt;2019 Top paying technologies&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Done
&lt;/h3&gt;

&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%2F0suunaoqrqk0dehpvpt8.png" 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%2F0suunaoqrqk0dehpvpt8.png" alt="Image  Celebrate" width="398" height="218"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Let's network
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/alexcalaca" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/alexandrecalacaofficial/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/alexandrecalaca"&gt;Dev.to&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>ruby</category>
      <category>webdev</category>
      <category>rails</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to undo a git pull command</title>
      <dc:creator>Alexandre Calaça</dc:creator>
      <pubDate>Fri, 08 Nov 2024 14:49:59 +0000</pubDate>
      <link>https://dev.to/alexandrecalaca/how-to-undo-a-git-pull-command-4ii1</link>
      <guid>https://dev.to/alexandrecalaca/how-to-undo-a-git-pull-command-4ii1</guid>
      <description>&lt;h3&gt;
  
  
  Situation
&lt;/h3&gt;

&lt;p&gt;Sometimes in &lt;code&gt;Git&lt;/code&gt;, we may want to go back to a previous state in our repository. This could be due to an unintended change, a deleted branch, or simply the need to return to an earlier version.&lt;/p&gt;

&lt;p&gt;In my situation, I wanted to revert a &lt;code&gt;git pull&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;Git’s &lt;code&gt;reflog&lt;/code&gt; command is really valuable for this, as it allows us to see the recent history of the repository, including actions like checkout, reset, and other state changes that wouldn’t normally appear in a &lt;code&gt;git log&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;Let's move on.&lt;/p&gt;




&lt;h3&gt;
  
  
  View the history of changes
&lt;/h3&gt;

&lt;p&gt;The first step is to view the &lt;code&gt;reflog&lt;/code&gt;. This shows a history of all the changes and commits you’ve made, even those that might not be reflected in the regular &lt;code&gt;git log&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reflog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected output&lt;/p&gt;

&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%2Fzedbv6kqazkmp37maw47.png" 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%2Fzedbv6kqazkmp37maw47.png" alt="Image git reflog" width="800" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each entry in the &lt;code&gt;reflog&lt;/code&gt; output displays:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The commit hash, which uniquely identifies each commit.&lt;/li&gt;
&lt;li&gt;The type of action taken (e.g., checkout, commit, reset).&lt;/li&gt;
&lt;li&gt;A brief description of the action.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;code&gt;reflog&lt;/code&gt; provides an easy way to find the exact commit we want to revert to or reset.&lt;/p&gt;

&lt;p&gt;In this example, we’ll identify the commit hash for our target commit.&lt;/p&gt;




&lt;h3&gt;
  
  
  Identify the commit
&lt;/h3&gt;

&lt;p&gt;After running git reflog, look for the commit hash you want to reset to.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reflog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected output&lt;/p&gt;

&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%2Feg78c240uyf7oawkcnd5.png" 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%2Feg78c240uyf7oawkcnd5.png" alt="Image Identify the commit" width="800" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I want to remove the most recent commit, so, I need to identify one commit before that.&lt;/p&gt;




&lt;h3&gt;
  
  
  Reset the head
&lt;/h3&gt;

&lt;p&gt;To move the state of your repository back to this specific commit, you’ll use &lt;code&gt;git reset&lt;/code&gt; with the &lt;code&gt;--hard&lt;/code&gt; option.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;--hard&lt;/code&gt; option tells Git to reset the staging area and working directory to match the specified commit. &lt;/p&gt;

&lt;p&gt;Pattern&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset --hard &amp;lt;commit-hash&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;IN my situation, the code would look something like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset --hard 5fp725df74
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected output&lt;br&gt;
After running this command, Git should confirm the reset, and your repository will be in the exact state it was at the specified commit:&lt;/p&gt;

&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%2Frew5756io0a0eubu6v98.png" 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%2Frew5756io0a0eubu6v98.png" alt="Image Reset the head" width="800" height="49"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  Confirm the reset
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reflog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Expected output&lt;br&gt;
The reset will be visible, showing that your &lt;code&gt;HEAD&lt;/code&gt; has been moved to the selected commit&lt;/p&gt;

&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%2Fdkmve3nbfpue75ujcoiv.png" 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%2Fdkmve3nbfpue75ujcoiv.png" alt="Image Git reflog again" width="800" height="256"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  Check your log
&lt;/h3&gt;

&lt;p&gt;To verify that your repository has been reset correctly, use the &lt;code&gt;git log&lt;/code&gt; command. This command shows the commit history, which should now reflect the state of your repository after the reset.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;git log&lt;/code&gt; output should now show the recent history up to the commit you reset to, with any subsequent commits excluded:&lt;/p&gt;

&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%2Ffxbbz5dryugv9tbiwezi.png" 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%2Ffxbbz5dryugv9tbiwezi.png" alt="Image  Git log" width="800" height="252"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Done
&lt;/h3&gt;




</description>
      <category>webdev</category>
      <category>git</category>
      <category>alexandrecalaca</category>
      <category>linux</category>
    </item>
    <item>
      <title>error Command "webpack" not found</title>
      <dc:creator>Alexandre Calaça</dc:creator>
      <pubDate>Wed, 06 Nov 2024 02:59:49 +0000</pubDate>
      <link>https://dev.to/alexandrecalaca/error-command-webpack-not-found-bpf</link>
      <guid>https://dev.to/alexandrecalaca/error-command-webpack-not-found-bpf</guid>
      <description>&lt;h2&gt;
  
  
  Situation
&lt;/h2&gt;

&lt;p&gt;After setting up my Rails 6 application and running rails server for the first time, I navigated to &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt; to check if everything was working.&lt;/p&gt;

&lt;p&gt;However, I immediately encountered an error screen, and the server log displayed the following messages:&lt;/p&gt;

&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%2F1z6gcnkn5636ccswq2yv.png" 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%2F1z6gcnkn5636ccswq2yv.png" alt="Image Situation" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It seemed like &lt;code&gt;Webpacker&lt;/code&gt; was trying to compile my JavaScript assets but couldn’t complete the process because it couldn't find &lt;code&gt;webpack&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Error
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error Command "webpack" not found.

  Rendered layout layouts/application.html.erb (Duration: 930.4ms | Allocations: 11999)
Completed 500 Internal Server Error in 934ms (ActiveRecord: 0.0ms | Allocations: 14691)



ActionView::Template::Error (Webpacker can't find application.js in /home/athanasius/www/mind_dash/public/packs/manifest.json. Possible causes:
1. You want to set webpacker.yml value of compile to true for your environment
   unless you are using the webpack -w or the webpack-dev-server.
2. webpack has not yet re-run to reflect updates.
3. You have misconfigured Webpacker's config/webpacker.yml file.
4. Your webpack configuration is not creating a manifest.
Your manifest contains:
{
}
):
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Explanation
&lt;/h3&gt;

&lt;p&gt;The error you're seeing indicates that &lt;code&gt;Webpacker&lt;/code&gt; is failing to compile your assets because it can't find the &lt;code&gt;webpack&lt;/code&gt; command. &lt;/p&gt;

&lt;p&gt;This issue typically arises when &lt;code&gt;webpack&lt;/code&gt; isn’t properly installed or configured in your Rails 6 application.&lt;/p&gt;




&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;To resolve issues with &lt;code&gt;Webpacker&lt;/code&gt;, first ensure that webpack and &lt;code&gt;webpack-cli&lt;/code&gt; are installed in your project. &lt;/p&gt;

&lt;p&gt;At least, this is how I solved my issue.&lt;/p&gt;




&lt;h3&gt;
  
  
  Install webpack and dependencies
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn add webpack webpack-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the installation completes, you should see output indicating that &lt;code&gt;webpack&lt;/code&gt; and &lt;code&gt;webpack-cli&lt;/code&gt; have been successfully added to your &lt;code&gt;node_modules&lt;/code&gt; directory.&lt;/p&gt;

&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%2Fvb3ir5bl1t2jld1cqdgt.png" 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%2Fvb3ir5bl1t2jld1cqdgt.png" alt="Image Install webpack and dependencies" width="800" height="532"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Rebuild webpacker
&lt;/h3&gt;

&lt;p&gt;After installing webpack, it’s important to rebuild Webpacker to ensure all configurations are updated.&lt;/p&gt;

&lt;p&gt;This command will generate or update files required for Webpacker to function correctly with Rails:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rails webpacker:install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command’s output should confirm that Webpacker has been installed and configured. It typically generates a message indicating that Webpacker's configuration files have been successfully created or updated.&lt;/p&gt;

&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%2Fiqnm7mbkozabqm6o6suo.png" 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%2Fiqnm7mbkozabqm6o6suo.png" alt="Image  Rebuild webpacker" width="456" height="37"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Run the server again
&lt;/h2&gt;




&lt;h2&gt;
  
  
  Done
&lt;/h2&gt;

&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%2Ffp1nliupt73dzn1zpsha.png" 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%2Ffp1nliupt73dzn1zpsha.png" alt="Image Done" width="696" height="500"&gt;&lt;/a&gt;&lt;/p&gt;




</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>rails</category>
      <category>alexandrecalaca</category>
    </item>
    <item>
      <title>How to Set Up SSH Keys for GitHub on PopOs or Ubuntu: A Beginner's Guide</title>
      <dc:creator>Alexandre Calaça</dc:creator>
      <pubDate>Tue, 05 Nov 2024 02:42:24 +0000</pubDate>
      <link>https://dev.to/alexandrecalaca/how-to-set-up-ssh-keys-for-github-on-popos-or-ubuntu-a-beginners-guide-2g3m</link>
      <guid>https://dev.to/alexandrecalaca/how-to-set-up-ssh-keys-for-github-on-popos-or-ubuntu-a-beginners-guide-2g3m</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this guide, you’ll learn how to generate an SSH key and set it up with GitHub. SSH keys provide a secure way to access GitHub without needing to repeatedly enter your password, making your workflow faster and more secure.&lt;/p&gt;




&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Generate a new SSH key
&lt;/h3&gt;

&lt;p&gt;To generate a new SSH key, run the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -t ed25519 -C "any comment"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command uses the ed25519 algorithm, which is considered both secure and efficient. Replace "any comment" with something descriptive, like your email or a short label.&lt;/p&gt;

&lt;p&gt;This comment will help you identify your key later, especially if you manage multiple SSH keys.&lt;/p&gt;

&lt;p&gt;Output&lt;/p&gt;

&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%2Ft4pqnwt93zre9cb2tl6l.png" 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%2Ft4pqnwt93zre9cb2tl6l.png" alt="Image Pattern" width="800" height="104"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Enter file
&lt;/h3&gt;

&lt;p&gt;You’ll be prompted to choose where to save the key file. By default, the SSH key is saved in the &lt;code&gt;~/.ssh&lt;/code&gt; directory with a generic name like &lt;code&gt;id_ed25519&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you’d like to name the key something else (e.g., pop_os_athanasius), you can enter the file path here.&lt;/p&gt;

&lt;p&gt;If you want to keep it as the default, simply press Enter.&lt;/p&gt;

&lt;p&gt;In this example, we’ll name it &lt;code&gt;/home/athanasius/.ssh/pop_os_athanasius.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Output&lt;/p&gt;

&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%2Fbn8esyzubw5m7n2n74ka.png" 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%2Fbn8esyzubw5m7n2n74ka.png" alt="Image Enter file" width="800" height="120"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Enter passphrase
&lt;/h3&gt;

&lt;p&gt;You’ll be prompted to enter a passphrase to protect your key. Using a passphrase is recommended for added security.&lt;/p&gt;

&lt;p&gt;However, if you prefer to leave it blank, just press Enter twice. Keep in mind that without a passphrase, anyone with access to your machine can use this key.&lt;/p&gt;

&lt;p&gt;In this example, we’ll leave it blank for simplicity.&lt;br&gt;
Output&lt;/p&gt;

&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%2Fu1xn6jel0ew66om0ikcn.png" 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%2Fu1xn6jel0ew66om0ikcn.png" alt="Image Enter passphrase" width="800" height="235"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  Verify the key generation
&lt;/h3&gt;

&lt;p&gt;Once the key generation process is complete, you should see a confirmation message showing the key’s fingerprint. This unique identifier verifies the key was created successfully.&lt;/p&gt;


&lt;h3&gt;
  
  
  View the public key
&lt;/h3&gt;

&lt;p&gt;To connect your SSH key with GitHub, you’ll need to add the public key to your GitHub account. To display your public key in the terminal, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat ./.ssh/pop_os_athanasius.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Adding the SSH Key to GitHub
&lt;/h2&gt;

&lt;p&gt;With your SSH key ready, it’s time to add it to GitHub for secure access.&lt;/p&gt;

&lt;h3&gt;
  
  
  Access GitHub Settings
&lt;/h3&gt;

&lt;p&gt;Navigate to GitHub, log in, and go to Settings. You can find this option in the drop-down menu under your profile icon.&lt;/p&gt;

&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%2Fstu3m1gddda9033213t9.png" 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%2Fstu3m1gddda9033213t9.png" alt="Image Settings" width="347" height="675"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Open the SSH and GPG Keys Section
&lt;/h3&gt;

&lt;p&gt;In the Settings menu, find and click on SSH and GPG keys from the sidebar. This section is where you’ll add new SSH keys to your GitHub account.&lt;/p&gt;

&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%2F6s0aactxbixf7wj7e9gs.png" 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%2F6s0aactxbixf7wj7e9gs.png" alt="Image SSH and GPG keys" width="347" height="675"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Add a New SSH Key
&lt;/h3&gt;

&lt;p&gt;Click New SSH key. You’ll be prompted to enter a title and paste your key.&lt;/p&gt;

&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%2Fdzwdrp9ewk9k5w8ij0mz.png" 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%2Fdzwdrp9ewk9k5w8ij0mz.png" alt="Image New SSH Key" width="800" height="151"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Save the key
&lt;/h3&gt;

&lt;p&gt;Click Add SSH key to save it to your GitHub account. You may be prompted to confirm this action with your GitHub password.&lt;/p&gt;

&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%2Fre17ep7njrzx6x4ienv4.png" 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%2Fre17ep7njrzx6x4ienv4.png" alt="Image Add the SSH key" width="800" height="365"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Check connection
&lt;/h3&gt;

&lt;p&gt;With your key added, let’s test the connection to GitHub. This step verifies that everything is configured correctly.&lt;/p&gt;

&lt;p&gt;Run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh -T git@github.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first time you connect to GitHub via SSH, you may see a message like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The authenticity of host 'github.com (20.201.28.151)' can't be established.
ED25519 key fingerprint is SHA256:+AiB3wcvD6FuJGhblZimn/zMBA0zZNSvHakb4evDOkU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Type yes
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The authenticity of host 'github.com (20.201.28.151)' can't be established.
ED25519 key fingerprint is SHA256:+AiB3wcvD6FuJGhblZimn/zMBA0zZNSvHakb4evDOkU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
Hi alexcalaca! You've successfully authenticated, but GitHub does not provide shell access.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Type yes and press Enter to continue. GitHub will now be added to your list of known hosts.&lt;/p&gt;




&lt;h3&gt;
  
  
  Success
&lt;/h3&gt;

&lt;p&gt;If you see the message confirming your authentication, congratulations! You’ve successfully set up SSH for GitHub, which means you can now use SSH-based commands to interact with your repositories.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hi alexcalaca! You've successfully authenticated, but GitHub does not provide shell access.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;/p&gt;

&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%2Flkoiv6th70qv4x8i269o.png" 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%2Flkoiv6th70qv4x8i269o.png" alt="Image Success" width="800" height="128"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Done
&lt;/h2&gt;




</description>
      <category>git</category>
      <category>github</category>
      <category>development</category>
      <category>alexandrecalaca</category>
    </item>
    <item>
      <title>Installing the best terminal emulator on Pop!_OS 22.04: Terminator</title>
      <dc:creator>Alexandre Calaça</dc:creator>
      <pubDate>Tue, 05 Nov 2024 01:34:40 +0000</pubDate>
      <link>https://dev.to/alexandrecalaca/installing-the-best-terminal-emulator-on-popos-2204-terminator-28f7</link>
      <guid>https://dev.to/alexandrecalaca/installing-the-best-terminal-emulator-on-popos-2204-terminator-28f7</guid>
      <description>&lt;h2&gt;
  
  
  Terminator
&lt;/h2&gt;

&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%2F94fn99mjnsakwrbcm4ed.png" 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%2F94fn99mjnsakwrbcm4ed.png" alt="Image Terminator" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Terminator is a popular terminal emulator for Linux, especially favored by power users and developers who work extensively with the command line. Terminator’s main attraction lies in its flexibility and advanced features like split screens, tabs, and extensive keyboard shortcuts. These features make it a versatile tool for managing multiple sessions and running commands concurrently.&lt;/p&gt;

&lt;p&gt;It's available in the software repositories of many Linux distributions and can be installed using package managers like APT (for Debian/Ubuntu-based systems) or YUM (for Red Hat/Fedora-based systems).&lt;/p&gt;




&lt;h2&gt;
  
  
  Let's get down to business
&lt;/h2&gt;

&lt;p&gt;Shall we?&lt;/p&gt;

&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%2F1xbdnnj3k7vm0ofg81dc.png" 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%2F1xbdnnj3k7vm0ofg81dc.png" alt="Image Let's get down to business" width="270" height="148"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Check your OS (optional)
&lt;/h2&gt;

&lt;p&gt;If you’re unsure about your operating system’s details, you can run a few simple commands to check. These commands give you information about the OS version, kernel, and distribution, which can be useful if you’re following specific installation instructions.&lt;/p&gt;

&lt;p&gt;Run these commands in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;uname -a         # Shows the system kernel version and architecture
hostnamectl      # Displays OS and hostname details
lsb_release -a   # Provides distribution-specific information
cat /etc/os-release # Shows detailed OS version and ID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;br&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%2Figa1dcb1ckpgp1d29tjw.png" 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%2Figa1dcb1ckpgp1d29tjw.png" alt="Image Check your OS (optional)&amp;lt;br&amp;gt;
" width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Knowing your OS version can be helpful when troubleshooting or verifying that Terminator is compatible with your system.&lt;/p&gt;

&lt;p&gt;IN this article, we'll focus on &lt;code&gt;PopOs&lt;/code&gt;.&lt;/p&gt;


&lt;h3&gt;
  
  
  Update package info
&lt;/h3&gt;

&lt;p&gt;Before installing any new software, it’s good practice to update your system’s package list to ensure you’re getting the latest version of any software. This step refreshes the local list of available packages and their versions from the configured software repositories.&lt;/p&gt;

&lt;p&gt;To update your system’s package information, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running sudo apt-get update is an important step before installing or upgrading packages on your system because it ensures that you have the most up-to-date information about available packages.&lt;/p&gt;

&lt;p&gt;Without updating the package index, you might not see the latest versions of software or be able to install new packages that have been added to the repositories since the last update.&lt;/p&gt;




&lt;h3&gt;
  
  
  Install Terminator
&lt;/h3&gt;

&lt;p&gt;Now that the package information is updated, you’re ready to install Terminator.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install terminator
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;br&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%2F50n55h5qn0gnq8jru5sb.png" 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%2F50n55h5qn0gnq8jru5sb.png" alt="Image Install Terminator" width="800" height="648"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The installation process will download and set up Terminator on your system. You may be prompted to enter your user password to authorize the installation.&lt;/p&gt;


&lt;h3&gt;
  
  
  verify installation
&lt;/h3&gt;

&lt;p&gt;After installation, it’s always a good idea to verify that &lt;code&gt;Terminator&lt;/code&gt; has been correctly installed. This can be done by checking its version and confirming its location in the system’s file paths.&lt;/p&gt;

&lt;p&gt;Run the following commands to verify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;terminator --version  # Displays the installed version of Terminator
which terminator      # Shows the location of the Terminator executable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;/p&gt;

&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%2Fnywngmjrk5dyeunkdvqh.png" 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%2Fnywngmjrk5dyeunkdvqh.png" alt="Image Check installation" width="497" height="120"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If both commands return results without errors, Terminator is successfully installed and ready to use.&lt;/p&gt;




&lt;h3&gt;
  
  
  Run
&lt;/h3&gt;

&lt;p&gt;With everything set up, you can launch Terminator by simply typing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;terminator
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;br&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%2F1pfxc43y2ej7qeeio374.png" 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%2F1pfxc43y2ej7qeeio374.png" alt="Image Run" width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When Terminator opens, you’ll see a simple interface that allows you to split the terminal screen horizontally or vertically, add new tabs, and customize each window. You can create multiple terminals in one window and manage each independently, making it easy to multitask without switching between different terminal windows.&lt;/p&gt;




&lt;h3&gt;
  
  
  Done
&lt;/h3&gt;

&lt;p&gt;You’re now ready to use Terminator. With its advanced features, Terminator can help make managing multiple command-line tasks simpler and more efficient.&lt;/p&gt;




&lt;h3&gt;
  
  
  Celebrate
&lt;/h3&gt;

&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%2Fjg7q4k25km0oz9pid51z.png" 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%2Fjg7q4k25km0oz9pid51z.png" alt="Image Celebrate" width="398" height="218"&gt;&lt;/a&gt;&lt;/p&gt;




</description>
      <category>ubuntu</category>
      <category>popos</category>
      <category>linux</category>
    </item>
    <item>
      <title>BCrypt::Errors::InvalidHash (invalid hash)</title>
      <dc:creator>Alexandre Calaça</dc:creator>
      <pubDate>Mon, 28 Oct 2024 17:35:12 +0000</pubDate>
      <link>https://dev.to/alexandrecalaca/bcrypterrorsinvalidhash-invalid-hash-22g0</link>
      <guid>https://dev.to/alexandrecalaca/bcrypterrorsinvalidhash-invalid-hash-22g0</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Encountering errors while resetting your database or managing password fields can be a challenging part of Rails development.&lt;/p&gt;

&lt;p&gt;In this simple article, I’ll walk through the process of resolving the &lt;code&gt;BCrypt::Errors::InvalidHash&lt;/code&gt; error, which occurred after recreating a user password. Here’s what happened, how I tested possible solutions, and the final approach that resolved the issue.&lt;/p&gt;




&lt;h2&gt;
  
  
  Context
&lt;/h2&gt;

&lt;p&gt;After running rails db:drop to drop the database and recreate it, I had to re-enter user data, including setting a new password. However, when attempting to assign a password to the encrypted_password field directly in the User model, I encountered the following error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BCrypt::Errors::InvalidHash (invalid hash)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&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%2Fzzmi6ei8w1yccxyhmxaz.png" 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%2Fzzmi6ei8w1yccxyhmxaz.png" alt="Image Context" width="800" height="247"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This error typically occurs when the value stored in encrypted_password is not a valid BCrypt hash. In Rails, if you're using has_secure_password, BCrypt expects a hashed value in encrypted_password. Assigning a plain-text password directly to encrypted_password without hashing causes this mismatch.&lt;/p&gt;




&lt;h2&gt;
  
  
  Inital setup
&lt;/h2&gt;

&lt;p&gt;After the database reset, I attempted to assign a password by manually setting encrypted_password:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user = User.new(email: "user@example.com")
user.encrypted_password = "newpassword123"  # Incorrect approach
user.save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Solution
&lt;/h3&gt;

&lt;p&gt;To resolve the error, I needed to ensure the password was properly hashed using BCrypt. Instead of manually assigning a value to encrypted_password, I updated the user’s password attribute directly and let BCrypt handle the hashing.&lt;/p&gt;

&lt;p&gt;Here’s the code that worked:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User.where(email: "email@example.com").first
hashed_password = BCrypt::Password.create("newpassword#0")
user.update_column(:encrypted_password, hashed_password)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Explanation
&lt;/h3&gt;

&lt;p&gt;In this solution, I used BCrypt::Password.create to hash the plain-text password "newpassword#0", then directly updated the password attribute.&lt;/p&gt;

&lt;p&gt;This approach allowed BCrypt to generate a valid hash for encrypted_password, avoiding the BCrypt::Errors::InvalidHash error. By assigning the hashed password to password, Rails automatically handled storage in the correct format, fixing the issue.&lt;/p&gt;




</description>
      <category>ruby</category>
      <category>rails</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
