【问题标题】:rails credentials:edit opens debug console on Rails 7 in productionrails credentials:edit 在生产环境中打开 Rails 7 上的调试控制台
【发布时间】:2022-07-05 10:35:37
【问题描述】:

升级到 Rails 7 后,执行此命令会打开 rdb 调试控制台:

EDITOR=nano rails credentials:edit --environment production

输出:

$ EDITOR=nano rails credentials:edit --environment production
/home/ubuntu/.rbenv/versions/3.0.0/lib/ruby/3.0.0/x86_64-linux/continuation.so: warning: callcc is obsolete; use Fiber instead
Debug.rb
Emacs support available.

/home/ubuntu/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:      Bootsnap::LoadPathCache.loaded_features_index.register(string_path, resolved)
(rdb:1)

如果我输入 exit 我会得到:

/home/ubuntu/.rbenv/versions/3.0.0/lib/ruby/3.0.0/debug.rb:240:in `synchronize': deadlock; recursive locking (ThreadError)
        from /home/ubuntu/.rbenv/versions/3.0.0/lib/ruby/3.0.0/debug.rb:240:in `check_suspend'
        from /home/ubuntu/.rbenv/versions/3.0.0/lib/ruby/3.0.0/debug.rb:838:in `trace_func'
        from /home/ubuntu/.rbenv/versions/3.0.0/lib/ruby/3.0.0/debug.rb:1104:in `block in <class:DEBUGGER__>'
        from /home/ubuntu/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from bin/rails:4:in `<main>'

为什么它不起作用?

【问题讨论】:

    标签: ruby-on-rails


    【解决方案1】:

    改用这个命令:

     EDITOR=nano RAILS_ENV=production rails credentials:edit
    

    【讨论】:

      猜你喜欢
      • 2015-05-05
      • 2013-02-15
      • 1970-01-01
      • 2011-01-05
      • 1970-01-01
      • 1970-01-01
      • 2021-05-22
      • 2013-06-29
      • 1970-01-01
      相关资源
      最近更新 更多