0

/redmine$ ruby​​ script/server -e production => Booting 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:Warning: 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:inconnect'

当我重新启动我的应用程序时会出现此问题。事实上,昨天它运行良好。但是今天我尝试了很多并搜索了网络,但无法成功。

谷歌搜索后,我得到一个命令来更新系统,即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'
4

2 回答 2

0

将 rails 升级到最新版本(2.3.5 相当旧)。

gem install rails --version 2.3.11

您还需要更新 environment.rb 中的依赖项,以将 RAILS_GEM_VERSION 设置为 2.3.11

Run rake rails:update

测试!Rails 升级似乎很少是无缝的。您确实有一套广泛的单元测试,不是吗... :)

于 2011-04-21T03:42:21.427 回答
0

有时,在解决此类问题时。我们再次提出任何其他冲突。

所以最好的部分是,只需获取应用程序文件夹和公用文件夹的 bakcup。重新安装整个导轨和红宝石。

因为经过一整天的投资来解决这个问题。我遵循了这个程序。请不要浪费时间。

于 2011-04-21T05:59:57.057 回答