开发者

Rails database connection error trying to set up development environment

开发者 https://www.devze.com 2023-03-12 16:19 出处:网络
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 Rub

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': Conne开发者_如何学JAVAction 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!


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)

0

精彩评论

暂无评论...
验证码 换一张
取 消