GithubHelp home page GithubHelp logo

Comments (6)

adrianthedev avatar adrianthedev commented on June 10, 2024

I was just about to post the same question.

In https://github.com/avo-hq/avo/ we want to test the package against a few ruby 2.x versions and 3.0. We are using the https://github.com/ddnexus/pagy gem and they use different versions for ruby 2.x and 3.x.

Thank you for your support!

from appraisal.

adrianthedev avatar adrianthedev commented on June 10, 2024

Not sure how this would work. I am on 2.7 and when I run this script it raises an error that it can't install pagy 4 on ruby <2.7 (the host's ruby).

Just as a clarification pagy 3 is for ruby <3.x and pagy 4 for ruby >=3.0.

["6.0", "6.1"].each do |rails_version|
  appraise "rails-#{rails_version}-ruby-2.6" do
    gem "rails", "~> #{rails_version}.0"
  end

  appraise "rails-#{rails_version}-ruby-2.7" do
    gem "rails", "~> #{rails_version}.0"
  end

  appraise "rails-#{rails_version}-ruby-3.0" do
    ruby "3.0"

    gem "rails", "~> #{rails_version}.0"
    gem "pagy", "~> 4.0"
  end
end

from appraisal.

n-rodriguez avatar n-rodriguez commented on June 10, 2024

@etagwerker you can also try #176

from appraisal.

n-rodriguez avatar n-rodriguez commented on June 10, 2024

@adrianthedev you can also try #176

from appraisal.

nickcharlton avatar nickcharlton commented on June 10, 2024

My immediate feeling is that #176 would be the right way to do this (I'm going to look at this once I fix several bundler compatibility issues we currently have as I write this).

On projects with multiple Rubies and Appraisal, I typically do this instead: https://github.com/thoughtbot/administrate/blob/main/.circleci/config.yml (see thoughtbot/administrate#1932 for using GitHub Actions instead)

So unlike in your examples, we're running a different Ruby version per container and keep the same Appraisal per Ruby version.

from appraisal.

nickcharlton avatar nickcharlton commented on June 10, 2024

I'm going to close this as it's not moved along in a long time — and hopefully #176 if good enough as a solution for most cases.

from appraisal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.