I’m using Postgres on Os X and get the same error. Seemingly an
upgrade from 0.14.2 (or so) to 1.0 broke unit testing for me.
The relevant output from Rake:
(in /Some/Path/To/Project)
createdb: database creation failed: ERROR: source database
“template1” is being accessed by other users
psql: FATAL: database “databasename_test” does not exist
/opt/local/bin/ruby -Ilib:test “/opt/local/lib/ruby/gems/1.8/gems/
rake-0.6.2/lib/rake/rake_test_loader.rb” “test/unit/podcast_test.rb”
“test/unit/tag_test.rb” “test/unit/weblog_comment_test.rb” “test/unit/
weblog_entry_test.rb”
Loaded suite /opt/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/
rake_test_loader
Started
EEEEEEEE
Finished in 0.141699 seconds.
Error:
test_truth(PodcastTest):
PGError: FATAL: database “databasename_test” does not exist
I’m using Postgres on Os X and get the same error. Seemingly an
upgrade from 0.14.2 (or so) to 1.0 broke unit testing for me.
The relevant output from Rake:
(in /Some/Path/To/Project)
createdb: database creation failed: ERROR: source database
“template1” is being accessed by other users
[…]
I’m a bit baffled by these errors…
I ran into the same problem and fixed it, by forcing “createdb” to
use template0… See my post http://blog.invisible.ch/2006/01/08/ruby-
on-rails-and-postgresql-schemas/
for this and some other fun with PostrgeSQL schematas
cu jc
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.