Rails webrick force-exits:未初始化的常量WebConsole :: Railtie :: Middleware(NameError)
所以我是ruby的新手,试图第一次启动webrick。 我刚刚用mysql2修复了分段错误错误,并遇到了这个新的退出问题。 这是命令行读数:
G:\ Ruby Development \ simple_cms>
G:\ Ruby Development \ simple_cms> rails服务器
=>启动WEBrick
=> Rails 4.2.1应用程序从http:// localhost:3000开始开发
=>运行
rails server -h
以获取更多启动选项=> Ctrl-C关闭服务器
退出
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.1.2/lib/web_console/railtie.rb:21:in`block in’:未初始化的常量WebConsole :: Railtie: :中间件(NameError)
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:在`instance_exec’中
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:在`block in run_initializers’中
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:在’run’中
来自C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:226:inclock in tsort_each’
来自C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:348:在每个_trtrongly_connected_component中的’block(2个级别)’
来自C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:429:在`each_strongly_connected_component_from’中
来自C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:347:在`block in each_strongly_connected_component’中
来自C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:345:在’each’中
来自C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:345:在`call’中
来自C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:345:在’each_strongly_connected_component’中
来自C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:224:in`tsort_each’
来自C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:203:在`tsort_each’中
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in”run_initializers’
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/application.rb:352:在`initialize!’
来自G:/ Ruby Development / simple_cms / config / environment.rb:5:in”
来自G:/ Ruby Development / simple_cms / config.ru:3:in`require’
来自G:/ Ruby Development / simple_cms / config.ru:3:在`block in’中
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/builder.rb:55:在`instance_eval’中
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/builder.rb:55:在`initialize’中
来自G:/ Ruby Development / simple_cms / config.ru:in the new’
来自G:/ Ruby Development / simple_cms / config.ru:in”
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in”eval’
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in,new_from_string’
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/builder.rb:40:in,parse_file’
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/server.rb:299:在`build_app_and_options_from_config’中
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/server.rb:208:在’app’中
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/server.rb:61:在’app’中
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/server.rb:336:在`wrapped_app’中
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/server.rb:139:在`log_to_stdout’中
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/server.rb:78:in”start’
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:80:in”lock in server’
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:在“tap”中
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in”server’
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:在`run_command!’中
来自C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in”
来自bin / rails:4:in`require’
来自bin / rails:4:in”
据我所知,到目前为止,我至少要加载服务器。 所以这不是分段错误的一部分,对吧?
我的gemfile包括web-console 2.1.2。 另外,为了以防万一,我还运行了“捆绑安装”。 对这个错误的任何见解? 如果需要更多信息,请与我们联系。
Rails版本-4.2.1 Ruby版本 – 2.2.1p85
有两个rails可执行文件。 您的PATH指向错误的路径。 输入’which rails’:你应该得到“〜/ bin / rails”,这是一个在你的主目录中放置的存根。 如果你得到别的东西,重命名那里的rails可执行文件并再试一次。