尝试设置开发环境时Rails数据库连接错误

发布于 2024-11-15 04:48:26 字数 1279 浏览 3 评论 0原文

我正在尝试设置对 Rails 2.3.3 应用程序进行前端更改,但无法以应用程序启动的方式(使用脚本/服务器)设置环境。我正在使用 RVM 运行 Ruby 1.8.7 和 Rails 2.3.3,但是当我尝试启动服务器时,出现以下错误:

/Users/myusername/.rvm/gems/ruby-1.8.7-p334@rails233/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:55:uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)

后面跟着 file 的踪迹以到达那里。谷歌搜索让我将 require 'thread' 添加到 boot.rb,这样我的错误就会更改为,

/Users/myusername/.rvm/gems/ruby-1.8.7-p334@rails233/gems/postgres-pr-0.6.3/lib/postgres-pr/connection.rb:165:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)

后面跟着它所经历的一长串文件。在谷歌搜索错误一段时间后,我认为这与我的database.yml或actionmailer的一些问题有关,但我几乎不知所措。我不知道这是否足以让任何人帮助我,但如果您有任何想法,请告诉我。我的宝石清单也是:

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.8, 2.3.3)
actionpack (3.0.8, 2.3.3)
activemodel (3.0.8)
activerecord (2.3.3)
activeresource (2.3.3)
activesupport (3.0.8, 2.3.3)
arel (2.0.10)
builder (3.0.0, 2.1.2)
erubis (2.6.6)
faker (0.3.1)
i18n (0.6.0, 0.5.0)
mail (2.2.19)
mime-types (1.16)
polyglot (0.3.1)
postgres-pr (0.6.3)
rack (1.2.3, 1.0.1)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (2.3.3)
rake (0.8.7)
sqlite3 (1.3.3)
treetop (1.4.9)
tzinfo (0.3.27)

感谢您提出的任何建议!

I'm trying to get set up to make front-end changes to a Rails 2.3.3 app, and I cannot get the environment set up in a way the application will start up (with script/server). I'm using RVM to run Ruby 1.8.7 with Rails 2.3.3, but when I try to start the server I get the following error:

/Users/myusername/.rvm/gems/ruby-1.8.7-p334@rails233/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:55:uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)

followed by the trail of filed to get there. Googling led me to add require 'thread' to boot.rb so my error changes to

/Users/myusername/.rvm/gems/ruby-1.8.7-p334@rails233/gems/postgres-pr-0.6.3/lib/postgres-pr/connection.rb:165:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)

followed by the long trail of files it went through to get there. After Googling the error for a while, I think it has something to do with either my database.yml or some problem with actionmailer but I'm pretty much at a loss. I don't know if this is nearly enough information for anyone to help me but if you have any ideas just let me know. Also my list of gems is:

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.8, 2.3.3)
actionpack (3.0.8, 2.3.3)
activemodel (3.0.8)
activerecord (2.3.3)
activeresource (2.3.3)
activesupport (3.0.8, 2.3.3)
arel (2.0.10)
builder (3.0.0, 2.1.2)
erubis (2.6.6)
faker (0.3.1)
i18n (0.6.0, 0.5.0)
mail (2.2.19)
mime-types (1.16)
polyglot (0.3.1)
postgres-pr (0.6.3)
rack (1.2.3, 1.0.1)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (2.3.3)
rake (0.8.7)
sqlite3 (1.3.3)
treetop (1.4.9)
tzinfo (0.3.27)

thanks for anything you can suggest!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

五里雾 2024-11-22 04:48:26

这个错误在我身上出现过几次,据我所知,没有真正好的解决方案。它来自 Rails 2.3.8 和 Rails 2.3.8 之间的不兼容性。红宝石宝石的较低版本和最新版本。

我建议尝试使用 Rails 2.3.11 或更高版本。

请参阅有关此错误的上一个问题:

未初始化常量 ActiveSupport::Dependencies::Mutex (NameError)

That error has come up a couple times on me and as far as I know there isn't really a good solution. It comes from an incompatibility between rails 2.3.8 & lower and recent versions of ruby gems.

I suggest trying to use rails 2.3.11 or higher instead.

Refer to a previous question regarding this error:

Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文