How to run the specs?

35 views
Skip to first unread message

jcmor...@gmail.com

unread,
Feb 2, 2014, 8:46:20 PM2/2/14
to casecom...@googlegroups.com
Hi all,

I forked the gem into my own repository.  When running rake I get

Unable to connect to database.  Please run:

    createdb pg_search_test

I'm not sure how to create the database, I created it with the postgres user but still get the same error.

Thanks,
JP

Grant Hutchins

unread,
Feb 3, 2014, 1:22:10 PM2/3/14
to casecom...@googlegroups.com, jcmor...@gmail.com
You will need to have a database named pg_search_test that the currently logged in user is able to access.

For my setup (which is PostgreSQL built by Homebrew, with default configuration) I'm able to run exactly this on the command line:

$ created pg_search_test

But the only reason it works is that my currently-logged-in user is marked as a superuser in PostgreSQL. I had already done this by running

$ createuser -s [my user name]

Now if you don't have the right permissions to control your database, then you'll have to do something different.

Note that I show the createdb message for any failure to connect to the database, as it's the most likely fix. If you post more of the exception (with backtrace), we might be able to figure out if something else is a problem.

Grant

JP Moral

unread,
Feb 6, 2014, 1:04:21 AM2/6/14
to casecom...@googlegroups.com, jcmor...@gmail.com
That worked, thanks!  I have one other question, when I run rake I get the following error:

There was a RuntimeError while loading pg_search.gemspec:
can't modify frozen String from ... pg_search.gemspec:7

The error goes away if I replace

s.version = PgSearch::VERSION

with

s.version = PgSearch::VERSION.dup

in the gemspec.  Is that the proper way to resolve it?

Grant Hutchins

unread,
Feb 10, 2014, 9:04:21 AM2/10/14
to casecom...@googlegroups.com
That pretty strange. Why would your system want to modify the version string?

Could you provide more information?

What is your OS?
What version of Ruby are you running?
What version of RubyGems?
What version of Bundler?

And what backtrace are you seeing?

Grant Hutchins
--
 
---
You received this message because you are subscribed to the Google Groups "Case Commons Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to casecommons-d...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages