[英]RedMine + gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010
/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) 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
connect' / redmine $ ruby script / server -e production =>引导WEBrick =>从http://0.0.0.0:3000 /home/siya/.rvm/gems/ruby-1.8.7-p330/开始的Rails 2.3.5应用程序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': Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (Mysql::Error) 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
谷歌搜索后,我得到一个命令来更新系统,即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'
Upgrade rails to the latest version (2.3.5 is fairly old). 将rails升级到最新版本(2.3.5相当旧)。
gem install rails --version 2.3.11
You will also need to update your dependencies in your environment.rb, to set RAILS_GEM_VERSION to 2.3.11 您还需要更新您的environment.rb中的依赖项,以将RAILS_GEM_VERSION设置为2.3.11
Run rake rails:update
Test! 测试! Rails upgrades seem to rarely be seamless. Rails升级似乎很少是无缝的。 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. 我们再次提出任何其他冲突。
So best part is that,just take the bakcup of application folder and public folder. 所以最好的部分是,只需占用应用程序文件夹和公用文件夹的空间。 Re-install the whole rails and ruby. 重新安装整个滑轨和红宝石。
Because after investing whole day to resolve this issue. 因为全天投入解决了这个问题。 I followed this procedure. 我遵循了此过程。 Please do not waste time. 请不要浪费时间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.