# Problems with rspec + remote db

**URL:** <https://www.ruby-forum.com/t/problems-with-rspec-remote-db/125750>\
**Category:** Rails\
**Created:** [January 11, 2008, 6:28pm UTC](https://www.ruby-forum.com/t/problems-with-rspec-remote-db/125750 "2008-01-11T18:28:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafael\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5a626/32.png) [@Rafael\_B](https://www.ruby-forum.com/u/Rafael_B)\
**Post date:** [January 11, 2008, 6:28pm UTC](https://www.ruby-forum.com/t/problems-with-rspec-remote-db/125750/1 "2008-01-11T18:28:16Z")

</div>

hey guys,  
I’m having a problem here, I have a pc in my house that I use as a db  
server (postgresql).  
I have the pr-postgresql gem running and it works very well  
But when I try to “rake spec” I get these 2 errors

C:/ruby/bin/rake: No such file or directory - dropdb -U “coleira”  
coleira\_test  
C:/ruby/bin/rake: No such file or directory - createdb -E unicode -U  
“coleira” coleira\_test

after doing a “rake spec --trace” I found out that this is happening  
at the rake db:test:purge task, so I’m gessing that it is trying to  
run “pgsql” from my machine. I tested migrating the database and it  
all went fine.

Is it not possible to use RSpec with a remote db?  
Any help will be fine, thanks in advance =)

---

<div class="post-metadata">

**Author:** ![Rafael\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5a626/32.png) [@Rafael\_B](https://www.ruby-forum.com/u/Rafael_B)\
**Post date:** [January 11, 2008, 11:46pm UTC](https://www.ruby-forum.com/t/problems-with-rspec-remote-db/125750/2 "2008-01-11T23:46:53Z")

</div>

On Jan 11, 2008 11:27 AM, Rafael B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> “coleira” coleira\_test
> 
> after doing a “rake spec --trace” I found out that this is happening  
> at the rake db:test:purge task, so I’m gessing that it is trying to  
> run “pgsql” from my machine. I tested migrating the database and it  
> all went fine.
> 
> Is it not possible to use RSpec with a remote db?

RSpec just wraps Rails testing in terms of interaction w/ databases,  
so this is really a rails testing question. One which I can’t answer  
for you, but hopefully someone else on this list can.

---

<div class="post-metadata">

**Author:** ![Rafael\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5a626/32.png) [@Rafael\_B](https://www.ruby-forum.com/u/Rafael_B)\
**Post date:** [January 12, 2008, 12:02am UTC](https://www.ruby-forum.com/t/problems-with-rspec-remote-db/125750/3 "2008-01-12T00:02:11Z")

</div>

On Jan 11, 2008 2:46 PM, David C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > coleira\_test  
> > RSpec just wraps Rails testing in terms of interaction w/ databases,  
> > so this is really a rails testing question. One which I can’t answer  
> > for you, but hopefully someone else on this list can.

Yeah, the problem is that Rails goes through the command-line client  
for dropping and creating with a db. You just need to add it to your  
path.

Pat
