Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 8.0 Support #1032

Open
andynu opened this issue Nov 8, 2024 · 9 comments
Open

Rails 8.0 Support #1032

andynu opened this issue Nov 8, 2024 · 9 comments

Comments

@andynu
Copy link

andynu commented Nov 8, 2024

The gem should work with Rails 8.0

Commands

gem install rails
rails new example
cd example
bundle add annotate --version '3.2.0'

Outcome:

Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Could not find compatible versions

Because annotate >= 3.2.0 depends on activerecord >= 3.2, < 8.0
  and rails >= 8.0.0 depends on activerecord = 8.0.0,
  annotate >= 3.2.0 is incompatible with rails >= 8.0.0.
So, because Gemfile depends on rails ~> 8.0.0
  and Gemfile depends on annotate = 3.2.0,
  version solving has failed.

Version

  • annotate version 3.2.0
  • rails version 8.0.0
  • ruby version 3.3.5
@davidrunger
Copy link

PR: #1033

@davidrunger
Copy link

davidrunger commented Nov 8, 2024

Per this thread, it seems like this gem might not be maintained anymore, and many people are moving to the fork https://github.com/drwl/annotaterb (annotaterb), which is already compatible with Rails 8.

Note, however, that the annotaterb fork is not an exact drop-in replacement. There are some changes in the syntax of the CLI command(s), and I found that many of the CLI options seem not to work for me, and instead I must specify the options that I want via a .annotaterb.yml config file, rather than via command line flags.

@spaquet
Copy link

spaquet commented Nov 12, 2024

@davidrunger thx for pointing this. The maintainer of this project should then put it in archive mode and let the community know where to go...

@aitor
Copy link

aitor commented Nov 13, 2024

@spaquet Correct, I didn't know that this gem was abandonware. Please @ctran, @Adeynack, @n-rodriguez, @lovro-bikic can any of you confirm if that is the case so we can all move on?

@n-rodriguez
Copy link
Contributor

@aitor Hi there! Actually I'm not a maintainer of annotate_model (only a contributor) but I've finally switched to https://github.com/drwl/annotaterb. It works and seems to be well maintained 👍 So feel free to move on it.

@Adeynack
Copy link
Contributor

Dear @aitor : Same as @n-rodriguez: I contributed only 2 PRs here. I am not a maintainer. I learn right now of this, as you are posting those. 😮

Thanks @aitor for the suggestion. I will give it a look ASAP.

@celsoMartins
Copy link

It's not working here with a recent update.

Let me know if you need further information.

~/w/t/flow_climate (main ± ) ∫ annotate --models                                                           [11:32:20]
/Users/celsomartins/.rvm/gems/ruby-3.3.6@flow_climate/gems/annotate-2.6.5/bin/annotate:3:in `<top (required)>': undefined method `exists?' for class File (NoMethodError)

unless File.exists?('./Rakefile') || File.exists?('./Gemfile')
           ^^^^^^^^
Did you mean?  exist?
	from /Users/celsomartins/.rvm/gems/ruby-3.3.6@flow_climate/bin/annotate:25:in `load'
	from /Users/celsomartins/.rvm/gems/ruby-3.3.6@flow_climate/bin/annotate:25:in `<main>'
	from /Users/celsomartins/.rvm/gems/ruby-3.3.6@flow_climate/bin/ruby_executable_hooks:22:in `eval'
	from /Users/celsomartins/.rvm/gems/ruby-3.3.6@flow_climate/bin/ruby_executable_hooks:22:in `<main>'

@n-rodriguez
Copy link
Contributor

@celsoMartins switch to https://github.com/drwl/annotaterb 😏

@celsoMartins
Copy link

OMG.

Okay, I'll do that.

Thanks.

tvararu added a commit to tvararu/ravn that referenced this issue Dec 5, 2024
It does not have Rails 8.0 support:

- ctran/annotate_models#1032
boddhisattva added a commit to boddhisattva/learner-web that referenced this issue Dec 16, 2024
Misc change
- Also use different annotate gem https://github.com/drwl/annotaterb as it has compatibility with Rails 8 and it overcomes the issues mentioned here: ctran/annotate_models#1032
boddhisattva added a commit to boddhisattva/learner-web that referenced this issue Dec 23, 2024
Misc change
- Also use different annotate gem https://github.com/drwl/annotaterb as it has compatibility with Rails 8 and it overcomes the issues mentioned here: ctran/annotate_models#1032
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants