红矿+ gem_dependency.rb:119:警告:Gem::Dependency#version_requirements 已弃用,并将于 2010 年 8 月或之后删除
/redmine$ ruby 脚本/服务器 -e 制作 =>启动 WEBrick => Rails 2.3.5 应用程序从 http://0.0.0.0:3000 开始 /home/siya/.rvm/gems/ruby-1.8.7-p330/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:警告:Gem::Dependency#version_requirements 已弃用并将被删除2010 年 8 月或之后。使用 #requirement /home/siya/.rvm/gems/ruby-1.8.7-p330/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:589:in real_connect': 无法连接到本地 MySQL 服务器通过套接字 '/var/run/mysqld/mysqld.sock' (2) (Mysql::Error) 来自 /home/siya/.rvm/gems/ruby-1.8.7-p330/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:589:in
connect'
出现此问题的时间我重新启动我的应用程序。事实上昨天它运行得很好。但今天我尝试了很多并在网上搜索,但未能成功。
谷歌搜索后,我得到了一个更新系统的命令,即 sudo gem update --system
现在出现了新的错误:
/home/siya/.rvm/gems/ruby-1.8.7-p330/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
from /home/siya/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/redmine$ ruby script/server -e production
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
/home/siya/.rvm/gems/ruby-1.8.7-p330/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/home/siya/.rvm/gems/ruby-1.8.7-p330/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:589:in real_connect': Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (Mysql::Error)
connect'
from /home/siya/.rvm/gems/ruby-1.8.7-p330/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:589:in
This issue occur's when I restart my application. In fact yesterday it was running fine. But today I tried a lot and searched the web, but could not get success.
After googling, I got one command to update the system ie sudo gem update --system
Now new error occurs:
/home/siya/.rvm/gems/ruby-1.8.7-p330/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
from /home/siya/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将 Rails 升级到最新版本(2.3.5 相当旧)。
您还需要更新environment.rb中的依赖项,将RAILS_GEM_VERSION设置为2.3.11
测试! Rails 升级似乎很少是无缝的。您确实有一套广泛的单元测试,不是吗...:)
Upgrade rails to the latest version (2.3.5 is fairly old).
You will also need to update your dependencies in your environment.rb, to set RAILS_GEM_VERSION to 2.3.11
Test! Rails upgrades seem to rarely be seamless. You do have an extensive suite of unit tests, don't you... :)
有时,在解决此类问题时。我们再次提出任何其他冲突。
因为花了一整天的时间来解决这个问题。我遵循了这个程序。请不要浪费时间。
Some-time, In resolving such type of issues. We again raise any other conflict.
Because after investing whole day to resolve this issue. I followed this procedure. Please do not waste time.