0

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!

NealJMD
  • 864
  • 8
  • 15
  • 4
    You're getting a connection error meaning one of two things. 1) your database.yml has the wrong username and password. 2) your database is not set up to allow connections from other applications. – Jeremy B. Jun 10 '11 at 20:49
  • how would I find the correct username and password to use? is it associated with the app or my local system? – NealJMD Jun 10 '11 at 21:12
  • +1 Jeremy. 1) ensure that you can connect to mysql with the same credentials you are using in database.yml: mysql -uUser -pPassword -DDatabase. 2) try getting into script/console and/or running a simple rake task with a trace in order to get more info about what's happening. – Yardboy Jun 10 '11 at 21:15
  • The credentials you use in databse.yml will be those on your local system. – Yardboy Jun 10 '11 at 21:16

1 Answers1

0

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)

Community
  • 1
  • 1
Kyle d'Oliveira
  • 6,382
  • 1
  • 27
  • 33
  • 1
    If you suspect this is the problem, since you are using RVM you can easily back up your rubygems version for this app to get one that works for you. The command is rvm rubygems 1.5.2, where 1.5.2 is the rubygems version number. 1.5.2 or 1.4.2 will probably work for you, and you can change it back after you've upgraded the app to 2.3.11. – Yardboy Jun 11 '11 at 02:34