简体   繁体   English

RedMine + gem_dependency.rb:119:警告:Gem :: Dependency#version_requirements已过时,将于2010年8月或之后删除

[英]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.

相关问题 “尝试加载gem'mysql2'时出错了。 (Bundler :: GemRequireError)“redmine安装后出现错误 - “There was an error while trying to load the gem 'mysql2'. (Bundler::GemRequireError)” error shows up after redmine installation Redmine安装:Mysql gem说未定义符号:mysql_init - Redmine installation: Mysql gem say undefined symbol: mysql_init Ruby gem版本兼容性问题 - Ruby gem version compatibility issues 如何使用ruby版本1.8.4 gem安装mysql? - How to gem install mysql with ruby version 1.8.4? 警告(代码 1681):不推荐使用“密码”并将在未来版本中删除 - Warning (code 1681): 'PASSWORD' is deprecated and will be removed in a future release 无法在Win 2008R2上安装Redmine .. gem install activerecord-mysql-adapter不起作用 - Unable to Install Redmine on Win 2008R2 .. gem install activerecord-mysql-adapter not working 更新到mysql 8安装后出现mysql gem故障 - Trouble with mysql gem after updating to mysql 8 installation 添加finerycms gem后迁移数据库中的问题 - Issue in migrating database after adding refinerycms gem 升级到Snow Leopard后的MySQL gem问题 - MySQL gem problem after upgrading to Snow Leopard 续集gem&MySQL(Ruby + Windows):加载mysql.so文件,而不是mysql.rb - Sequel gem & MySQL (Ruby + Windows): load mysql.so file, not mysql.rb
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM