thoughtbot / appraisal

A Ruby library for testing your library against different versions of dependencies.
https://thoughtbot.com
MIT License
1.25k stars 107 forks source link

Can't find executable appraisal for gem appraisal #210

Closed evbuk1 closed 11 months ago

evbuk1 commented 1 year ago

When I run

bundle exec appraisal install

I receive the following error:

Traceback (most recent call last):
        4: from /usr/share/rvm/gems/ruby-2.7.4/bin/ruby_executable_hooks:22:in `<main>'
        3: from /usr/share/rvm/gems/ruby-2.7.4/bin/ruby_executable_hooks:22:in `eval'
        2: from /usr/share/rvm/gems/ruby-2.7.4/bin/appraisal:23:in `<main>'
        1: from /usr/share/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/bundler/rubygems_integration.rb:402:in `block in replace_bin_path'
/usr/share/rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/bundler/rubygems_integration.rb:374:in `block in replace_bin_path': can't find executable appraisal for gem appraisal (Gem::Exception)

My appraisal file looks as follows:

if RUBY_VERSION < '1.9'
  appraise 'activerecord_2_2' do
    gem 'activerecord', '~> 2.2.0'
    gem 'factory_girl', '~> 2.3.0'
    gem 'rake', '~> 0.8.7'
  end
end

appraise 'activerecord_2_3' do
  gem 'activerecord', '~> 2.3.0'
end

appraise 'activerecord_3_0' do
  gem 'activerecord', '~> 3.0.0'
end

appraise 'activerecord_3_1' do
  gem 'activerecord', '~> 3.1.0'
end

appraise 'activerecord_3_2' do
  gem 'activerecord', '~> 3.2.0'
end

if RUBY_VERSION >= '1.9'
  appraise 'activerecord_4_0' do
    gem 'activerecord', '~> 4.0.0'
    gem 'mysql', '~> 2.9.0' if ENV['DB'] == 'mysql'
    gem 'protected_attributes', '~> 1.0.0'
  end

  appraise 'activerecord_4_1' do
    gem 'activerecord', '~> 4.1.0'
    gem 'mysql', '~> 2.9.0' if ENV['DB'] == 'mysql'
    gem 'protected_attributes', '~> 1.0.0'
  end
end

This is an old project that I am updating but I don't have an idea about the error above. Can someone point me in the right direction please?

nickcharlton commented 1 year ago

Which version of bundler are you using?

What do you get if you install Appraisal from main? We might've fixed it by now, but it's hard to tell!

y-yagi commented 1 year ago

@nickcharlton

Hello. I probably meet the same issue. The error is here: https://github.com/rubyconfig/config/actions/runs/5068465025/jobs/9100817130

The bundler version is 2.4.1.

I tried to install appraisal from main and it works well. So I think the issue is already fixed in main. Do you have a plan to release the new version of gem?

pkuczynski commented 1 year ago

@nickcharlton seems that @y-yagi is correct and it works from main. We would appreciate a release of a new version of the gem...

nickcharlton commented 11 months ago

Ah hah, okay cool. I'm looking at doing a new release today/tomorrow so that's good.

Thanks everyone for the reports and input here!