为什么在运行Rails控制台时出现此错误?

时间:2019-04-09 15:37:37

标签: ruby-on-rails

当我运行Rails控制台时出现错误,其他所有东西似乎都运行良好。我可以启动服务器而没有任何错误日志。

Running via Spring preloader in process 13744
Traceback (most recent call last):
    24: from -e:1:in `<main>'
    23: from /usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    22: from /usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    21: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:287:in `load'
    20: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:259:in `load_dependency'
    19: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:287:in `block in load'
    18: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:287:in `load'
    17: from /home/archie/work/Hostel-Allotment-System/bin/rails:9:in `<top (required)>'
    16: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:293:in `require'
    15: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:259:in `load_dependency'
    14: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:293:in `block in require'
    13: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:293:in `require'
    12: from /usr/lib/ruby/gems/2.6.0/gems/railties-5.0.7/lib/rails/commands.rb:18:in `<top (required)>'
    11: from /usr/lib/ruby/gems/2.6.0/gems/railties-5.0.7/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
    10: from /usr/lib/ruby/gems/2.6.0/gems/railties-5.0.7/lib/rails/commands/commands_tasks.rb:68:in `console'
     9: from /usr/lib/ruby/gems/2.6.0/gems/railties-5.0.7/lib/rails/commands/commands_tasks.rb:138:in `require_command!'
     8: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:293:in `require'
     7: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:259:in `load_dependency'
     6: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:293:in `block in require'
     5: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:293:in `require'
     4: from /usr/lib/ruby/gems/2.6.0/gems/railties-5.0.7/lib/rails/commands/console.rb:2:in `<top (required)>'
     3: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:293:in `require'
     2: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:259:in `load_dependency'
     1: from /usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:293:in `block in require'
/usr/lib/ruby/gems/2.6.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:293:in `require': cannot load such file -- irb (LoadError)

我已经安装了irb

$ whereis irb                                                                                                                    1 ↵
irb: /home/archie/.rbenv/shims/irb /home/archie/.gem/ruby/2.6.0/bin/irb

并将其添加到路径。

0 个答案:

没有答案