mysql Rails的问题

时间:2018-04-18 21:56:41

标签: mysql ruby-on-rails ruby ruby-on-rails-5

启动服务器或创建新脚手架时会出现此问题。

    Traceback (most recent call last):
    18: from bin/rails:4:in `<main>'
    17: from bin/rails:4:in `require'
    16: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in `<top (required)>'
    15: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/command.rb:44:in `invoke'
    14: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/command/base.rb:63:in `perform'
    13: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
    12: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
    11: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
    10: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands/generate/generate_command.rb:19:in `perform'
     9: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
     8: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/command/actions.rb:15:in `require'
     7: from /home/jeyjeyanischixx/ruby/auto/config/application.rb:17:in `<top (required)>'
     6: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler.rb:114:in `require'
     5: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `require'
     4: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `each'
     3: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `block in require'
     2: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `each'
     1: from /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:80:in `block (2 levels) in require'
  /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:84:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'turbolinks'. (Bundler::GemRequireError)
   Gem Load Error is: uninitialized constant Turbolinks::Source
   Backtrace for gem load error is: /home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/turb olinks-5.1.1/lib/turbolinks.rb:18:in `<class:Engine>'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/turbolinks-5.1.1/lib/turbolinks.rb:15:in `<module:Turbolinks>'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/turbolinks-5.1.1/lib/turbolinks.rb:6:in `<top (required)>'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `require'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `each'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `block in require'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `each'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `require'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler.rb:114:in `require'
/home/jeyjeyanischixx/ruby/auto/config/application.rb:17:in `<top (required)>'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/command/actions.rb:15:in `require'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands/generate/generate_command.rb:19:in `perform'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/command/base.rb:63:in `perform'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/command.rb:44:in `invoke'
/home/jeyjeyanischixx/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Bundler Error Backtrace:

1 个答案:

答案 0 :(得分:0)

您的错误来自捆绑商试图捆绑您的宝石:

 in require': There was an error while trying to load the gem 'turbolinks'. (Bundler::GemRequireError)

抛出此错误是因为代码中的某个地方或库中的代码中存在一个从未设置为任何内容的常量Turbolinks::Source,因此代码调用的地方Turbolinks::Source,但是因为它没有引用任何东西,它会引发错误。在不共享代码的情况下,很难给出更好的答案。