Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.4K
Visualizações
Rails and Ruby versions always conflict, and will never be able to bundle install

I git cloned my own repo, when I want to start (rails s), there will be a request to install Rails (sudo apt install ruby-railties), even though I installed it. If I start the installation (gem install rails), there will be a message that the Ruby version is too old:

ERROR: Error installing rails:
        There are no versions of activesupport (= 7.0.0) compatible with your Ruby & RubyGems. Maybe try installing an older version of the gem you're looking for?
        activesupport requires Ruby version >= 2.7.0. The current ruby ​​version is 2.6.6.146.

If I switch to the requested version (rvm use 2.7), the following message will appear when I run rails s:

Could not find proper version of railties (6.1.4.1) in any of the sources
Run `bundle install` to install missing gems.

When I proceed to bundle install, there will be a need to switch the Ruby version:

Your Ruby version is 2.7.2, but your Gemfile specified 2.6.6

This is equivalent to going back to the beginning. This stupid loop prevented me from completing the bundle install and thus rails s.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Regarding the pg error, you need to change your 'pg' gem to a lower version. Let us see what you have in your gemfile.

over 4 years ago · Santiago Trujillo Relatório

0

Setup the environment inside your project folder.

cd yourproject

Then install Ruby, Rails and Bundler.


Install Ruby v2.7.0, through Ruby Version Manager (RVM) https://rvm.io/

gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

\curl -sSL https://get.rvm.io | bash -s stable

source /etc/profile.d/rvm.sh

rvm install ruby 2.7.0
rvm use 2.7.0
rvm list

Install Rails, through RubyGems https://rubygems.org

(don't use apt install ruby-railties )

gem install rails
rails --version

(re)Install Bundler

gem install bundler

bundle install
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda