当前位置: 首页 > 知识库问答 >
问题:

“Rails服务器”的问题

左丘涵畅
2023-03-14

    public is no longer used to avoid overloading Module#public, use :public_folder instead
    from /usr/lib/ruby/gems/1.8/gems/web_translate_it-1.7.1.3/lib/web_translate_it/server.rb:12
    DEPRECATION WARNING: require "activerecord" is deprecated and will be removed in Rails 3. Use require "active_record" instead. (called from /usr/lib/ruby/vendor_ruby/activerecord.rb:2)
    => Booting WEBrick
    => Rails 3.2.12 application starting in development on http://0.0.0.0:3000
    => Call with -d to detach
    => Ctrl-C to shutdown server
    Exiting
    /usr/lib/ruby/gems/1.8/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': Access denied for user 'fubademoall'@'localhost' (using password: YES) (Mysql2::Error)
        from /usr/lib/ruby/gems/1.8/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `send'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `checkout'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `checkout'
        from /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `connection'
        from /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/model_schema.rb:308:in `clear_cache!'
        from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.12/lib/active_record/railtie.rb:97:in `_callback_before_3'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:418:in `_run__1552657550__prepare__4__callbacks'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `send'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `__run_callback'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:385:in `_run_prepare_callbacks'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:81:in `send'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:81:in `run_callbacks'
        from /usr/lib/ruby/gems/1.8/gems/actionpack-3.2.12/lib/action_dispatch/middleware/reloader.rb:74:in `prepare!'
        from /usr/lib/ruby/gems/1.8/gems/actionpack-3.2.12/lib/action_dispatch/middleware/reloader.rb:48:in `prepare!'
        from /usr/lib/ruby/gems/1.8/gems/railties-3.2.12/lib/rails/application/finisher.rb:47
        from /usr/lib/ruby/gems/1.8/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
        from /usr/lib/ruby/gems/1.8/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
        from /usr/lib/ruby/gems/1.8/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `run_initializers'
        from /usr/lib/ruby/gems/1.8/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
        from /usr/lib/ruby/gems/1.8/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
        from /usr/lib/ruby/gems/1.8/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
        from /usr/lib/ruby/gems/1.8/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `send'
        from /usr/lib/ruby/gems/1.8/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'

谢谢你的忠告!

共有1个答案

陆文博
2023-03-14

连接到MySQL数据库时出错:

/usr/lib/ruby/gems/1.8/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:在“connect”中:拒绝用户“fubademoall”@"localhost“的访问(使用密码:YES)(mysql2::error)

检查config/database.yml中的配置是否与正在使用的MySQL服务器上的数据库凭据匹配。

 类似资料:
  • 问题内容: ‘create’方法在控制器中并映射到“ / login”,我正在设置正确的内容类型并接受来自curl客户端的标头。我一直都收到422 http状态响应。 有什么建议? 问题答案: 如果您发送的是正确的标题,则不需要执行“ ActiveSupport :: JSON.decode”-rails会为您完成。 您需要在帖子中设置以下标题。 422表示不可处理实体-通常表示验证失败。 您应该

  • 问题内容: 我已经安装了rails和mysql。我还安装了mysql2 gem。我通过命令rails new try_cms -d mysql创建了Rails应用程序。创建成功。但是,当我尝试使用rails server命令运行WEBrick服务器时,出现以下错误。 提前致谢。 问题答案: 尝试运行此命令(在此处查看类似的问题)

  • 由于 Rails 项目对环境要求的特殊性,建议你在部署的时候直接选择 VPS 或者 独立服务器,当然也有一些专门部署 Rails 项目的虚拟空间可选择。 国内 VPS/云主机 UCloud Ruby China 目前部署在 UCloud 上。 阿里云服务器 55 元每月的最低配还是比较给力,自带 1M 带宽,CPU、内存、带宽目前均可定制,价格相对适中。 腾讯云 腾讯的云服务。 文件存储 当你的项

  • 我是Ruby on Rails的新手,所以很抱歉这个问题,它可能很容易,但是... 所以,这里是我的问题:我有一个带有RoR的Ubuntu12.04。我正在参与一些项目,所以我已经签出了svn,安装了捆绑包,现在我在rails服务器上遇到了问题。这是终端的日志 谢谢你的建议!

  • 我刚刚安装了Ruby193和Ruby200,在创建了一个新的应用程序之后,我正在尝试加载服务器,但是我得到了下面的错误。 我用gem'sqlite3'替换了sqlite3 gem,'~ 有人知道怎么修吗? Gemfile是 Bundle Show提供捆绑包中包含的宝石: actionmailer(3.2.13) actionpack(3.2.13) activemodel(3.2.13) acti

  • 我试图运行rails服务器,出现了这个错误! 命令提示符上的错误消息 Gemfile 宝石'Rails','4.2.6' gem'mysql2',' 创业板“sdoc”~ 宝石'tzinfo-data',平台:[: mingw,: mswin,:x64_mingw,: jruby]