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 aborted! Unknown version "7.0" #4

Closed
cesc1989 opened this issue Jan 27, 2023 · 2 comments
Closed

rails aborted! Unknown version "7.0" #4

cesc1989 opened this issue Jan 27, 2023 · 2 comments

Comments

@cesc1989
Copy link
Contributor

cesc1989 commented Jan 27, 2023

Bundle complete! 30 Gemfile dependencies, 105 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
         run  bundle binstubs bundler
       **rails  importmap:install** <- notice this
rails aborted!
Unknown version "7.0"
/Users/fquintero/.rvm/gems/ruby-2.7.1/gems/railties-6.1.3.2/lib/rails/application/configuration.rb:205:in `load_defaults'
/Users/fquintero/projects/devaspros-projects/prueba_puntapie/config/application.rb:24:in `<class:Application>'
/Users/fquintero/projects/devaspros-projects/prueba_puntapie/config/application.rb:23:in `<module:PruebaPuntapie>'
/Users/fquintero/projects/devaspros-projects/prueba_puntapie/config/application.rb:21:in `<top (required)>'
/Users/fquintero/projects/devaspros-projects/prueba_puntapie/Rakefile:4:in `require_relative'
/Users/fquintero/projects/devaspros-projects/prueba_puntapie/Rakefile:4:in `<top (required)>'
/Users/fquintero/.rvm/gems/ruby-2.7.1/gems/railties-6.1.3.2/lib/rails/commands/rake/rake_command.rb:20:in `block in perform'
/Users/fquintero/.rvm/gems/ruby-2.7.1/gems/railties-6.1.3.2/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/Users/fquintero/.rvm/gems/ruby-2.7.1/gems/railties-6.1.3.2/lib/rails/command.rb:52:in `invoke'
/Users/fquintero/.rvm/gems/ruby-2.7.1/gems/railties-6.1.3.2/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'

The error could be because it's doing some importmap stuff but it's rails 6 not 7!

@cesc1989 cesc1989 changed the title rails aborted! nknown version "7.0" rails aborted! Unknown version "7.0" Jan 27, 2023
@cesc1989
Copy link
Contributor Author

The thing is for some reason the generator sets config.load_defaults to version 7.0 in config/application.rb:

config.load_defaults 7.0

I inspected source code and it looks OK. Don't know how to send the correct version to the generator. Tried adding a RAILS_VERSION file and also placing a string in a rails_version method in the template.rb but it doesn't work.

What seems to work is using rails 7 in Gemfile.tt

@cesc1989
Copy link
Contributor Author

cesc1989 commented Jan 27, 2023

Can't say it's fixed.

Had to use rails version 7 but still using webpacker version 3. Probably will have many issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant