Closed bdavidxyz closed 2 years ago
Yes, the rodauth:routes
rake task in latest rodauth-rails version is incompatible with the latest Rodauth version. This has been fixed in master, please use that for the time being.
I'm close to releasing rodauth-rails 1.0, the main blocker is currently that I've been randomly receiving ActionController::InvalidAuthenticityToken
errors when testing with Rails 7 & Hotwire, so I would like to get to the bottom of it first.
Alternatively, you can enable the path_class_methods
feature in your Rodauth config.
Version 1.0 has been released, which fixes this issue.
Sorry to open the 43rd issue, 42 was perfect ;)
Step to reproduce. MacOS 10.15.7 :
Rails 7 will be used
Now let's add rodauth-rails to this simple, default Rails app :
inside Gemfile
then
bundle install
then
bin/rails generate rodauth:install
then
bin/rails db:migrate
then
bin/rails rodauth:routes --trace
Will produce this error :
Invoke rodauth:routes (first_time) Invoke environment (first_time) Execute environment Execute rodauth:routes Routes handled by RodauthApp: rails aborted! NoMethodError: undefined method'
Tasks: TOP => rodauth:routes
login_path' for #<Class:0x00007f8e7f08d850> /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rodauth-rails-0.18.1/lib/rodauth/rails/tasks.rake:14:in
public_send' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rodauth-rails-0.18.1/lib/rodauth/rails/tasks.rake:14:inblock (4 levels) in <main>' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rodauth-rails-0.18.1/lib/rodauth/rails/tasks.rake:10:in
map' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rodauth-rails-0.18.1/lib/rodauth/rails/tasks.rake:10:inblock (3 levels) in <main>' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rodauth-rails-0.18.1/lib/rodauth/rails/tasks.rake:7:in
each' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rodauth-rails-0.18.1/lib/rodauth/rails/tasks.rake:7:inblock (2 levels) in <main>' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in
block in execute' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:ineach' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in
execute' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:219:inblock in invoke_with_call_chain' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in
synchronize' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:ininvoke_with_call_chain' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:188:in
invoke' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:160:ininvoke_task' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in
block (2 levels) in top_level' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:ineach' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in
block in top_level' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:125:inrun_with_threads' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:110:in
top_level' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-7.0.0/lib/rails/commands/rake/rake_command.rb:24:inblock (2 levels) in perform' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:186:in
standard_exception_handling' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-7.0.0/lib/rails/commands/rake/rake_command.rb:24:inblock in perform' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in
with_application' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-7.0.0/lib/rails/commands/rake/rake_command.rb:18:inperform' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-7.0.0/lib/rails/command.rb:51:in
invoke' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-7.0.0/lib/rails/commands.rb:18:in<main>' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in
require' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:inblock in require_with_bootsnap_lfi' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in
register' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:inrequire_with_bootsnap_lfi' /Users/david/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in
require' bin/rails:4:in `