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

“导轨服务器”的问题

伯庆
2023-03-14

我是Ruby on Rails的新手,所以很抱歉这个问题,它可能很容易,但是...

所以,这里是我的问题:我有一个带有RoR的Ubuntu12.04。我正在参与一些项目,所以我已经签出了svn,安装了捆绑包,现在我在rails服务器上遇到了问题。这是终端的日志


    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'

谢谢你的建议!

共有3个答案

岳朝
2023-03-14

我认为错误消息的相关行是:

`connect': Access denied for user 'fubademoall'@'localhost' (using password: YES) (Mysql2::Error)

你设置了mysql吗?权限是否正确?

壤驷文华
2023-03-14
If you are new Please see following eg: for creating database, grant ,and database.yml file  

=> Go to Mysql :
D:\sandeep\Ruby Projects\simple_cms>mysql -u root -p
Enter password: ********

=>Create Database :
 create database simple_cms_development 

=>Gtanting the Access to database : 
 mysql> grant all privileges on simple_cms_development.*
     ->to 'simple_cms' @'localhost'
     -> identified by 'secretpassword';
Query OK, 0 rows affected (0.00 sec)

=>See Database and Grant :
 mysql> show grants for 'simple_cms' @'localhost';

=>And Your database.yml file like this :
development:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: simple_cms_development
  pool: 5
  username: simple_cms
  password: secretpassword
  socket: /tmp/mysql.sock

test:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: simple_cms_test
  pool: 5
  username: root
  password:
  socket: /tmp/mysql.sock

production:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: simple_cms_production
  pool: 5
  username: root
  password:
  socket: /tmp/mysql.sock
闻人嘉悦
2023-03-14

连接到MySQL数据库时出错:

/usr/lib/ruby/gems/1.8/gems/MySQL 2-0 . 3 . 11/lib/MySQL 2/client . Rb:44:in ' connect ':拒绝用户' fubademoall'@'localhost '的访问(使用密码:YES) (Mysql2::Error)

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

 类似资料:
  • OBIEE服务器WSDL url是http://mysrvr:port/analytics/saw.dll?WSDL wsdlException:faultcode=parser_error:解析“http://mysrvr:port/analytics/saw.dll?wsdl”时出现问题。:org.xml.sax.saxParseException:实体“html.version”的声明必须以

  • 服务器的引导共用了客户端引导的一些逻辑。 引导服务器的方法 下表显示了 ServerBootstrap 的方法 Table 9.2 Methods of ServerBootstrap‘ 名称 描述 group 设置 EventLoopGroup 用于 ServerBootstrap。这个 EventLoopGroup 提供 ServerChannel 的 I/O 并且接收 Channel cha

  • 谢谢你的忠告!

  • 我似乎无法将@current_用户存根,以便我的before_filter:login_required通过,并获得正确的模板,而不是重定向到登录屏幕。 这是我的控制器规格: 我相信这是用于存根的较新rspec语法。 下面是一些使用控制器的示例。存根方法,但这似乎不起作用。我只想存根@current_user变量,这样看起来就像用户登录了一样,这样我就可以用实际的控制器规范测试我的控制器了。现在,

  • 2018-01-26 04:27:02[http-nio-8090-exec-5]调试o.a.coyote.http11.http11processor-错误解析HTTP请求头“java.io.eofexception:null at org.apache.tomcat.util.net.nioEndpoint$niosocketwrapper.fillreadbuffer(NioEndpoint

  • 某些情况下你可能需要搭建自己的导出服务器,例如内部应用没有外网、数据保密性比较高(我们的导出服务器不会存储任何请求数据)等,在这些情况下,你可以考虑搭建自己的导出服务器。 在搭建导出服务器之前,如果不需要在 IE9 及以下的浏览器中使用导出功能,可以考虑直接使用 客户端导出。 一、NodeJS 导出服务器 Nodejs 导出服务器是一个将 Highcharts 图表转换成静态图片(PNG、JPG、