I also tried with an earlier (1.2.6) version of Rails, without
success.
Any clue?
----
Is there a database in postgres for development? Does it work? It looks
like the postgresql adaptor can't connect.
Craig
Yes, there is a PostgreSQL db named depot_development (actually I'm
following the book Agile Web Development With Rails). I checked if the
server was running (pg_ctl status –D "C:\Program
Files\PostgreSQL\8.3\data" and it says that no server is running.
When I start the server (pg_ctl start -D "C:...), it says that one is
already running, because the file where server status is written
(postmaster.pid) exists.
However that file cannot be deleted, neither by PostgreSQL nor manually
by me. I am starting to suspect a read/write permission problem. I was,
but am no longer administrator on my computer.
Craig White wrote:
>> lib/ruby/gem
>> dependenci
>> c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
>> dapters/abstract/connection_specification.rb:291:in `connection='
>> c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/databases.rake:85
>> hain'
>> n_handling'
>>
>>
>> I also tried with an earlier (1.2.6) version of Rails, without
>> success.
>> Any clue?
> ----
> Is there a database in postgres for development? Does it work? It looks
> like the postgresql adaptor can't connect.
>
> Craig
Yes, there is a PostgreSQL db named depot_development (actually I'm
following the book Agile Web Development With Rails). I checked if the
server was running (pg_ctl status -D "C:\Program
Files\PostgreSQL\8.3\data" and it says that no server is running.
When I start the server (pg_ctl start -D "C:...), it says that one is
already running, because the file where server status is written
(postmaster.pid) exists.
However that file cannot be deleted, neither by PostgreSQL nor manually
by me. I am starting to suspect a read/write permission problem. I was,
but am no longer administrator on my computer.
you should be able to connect from command line if postgresql is
actually running and until you can do that, it's probably not reasonable
to assume that it's a ruby on rails issue...
# psql th-db_development -Upostgres
Welcome to psql 8.1.11, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
If you can connect as a user to the database...then rails should work
Craig
Yes I can connect (psql -U postgres depot_development) without any
problem.
> you should be able to connect from command line if postgresql is
> actually running and until you can do that, it's probably not reasonable
> to assume that it's a ruby on rails issue...
>
> # psql th-db_development -Upostgres
> Welcome to psql 8.1.11, the PostgreSQL interactive terminal.
>
> Type: \copyright for distribution terms
> \h for help with SQL commands
> \? for help with psql commands
> \g or terminate with semicolon to execute query
> \q to quit
>
> If you can connect as a user to the database...then rails should work
>
> Craig
Yes I can connect (psql -U postgres depot_development) without any
problem.
Ruby version 1.8.6 (i386-mswin32)
RubyGems version 1.2.0
Rails version 2.1.0
Active Record version 2.1.0
Action Pack version 2.1.0
Active Resource version 2.1.0
Action Mailer version 2.1.0
Active Support version 2.1.0
Application root C:/Users/Erik/sandbox/wpgtest
Environment development
Database adapter postgresql
Database schema version 0
this is with PostgreSQL 8.3.3
I used the 1 click ruby windows installer
I used the PostgreSQL installer and made sure to install the dev stuff.
I then made sure to have the postgresql bin lib and include in the path.
I made a new sandbox using the -d flag:
rails -d postgresql wpgtest.yml
edited the database which now is pre-setup for postgresql and tells you
want gem to install.
I installed said gem.
in pgAdmin I created my sandbox user and database.
I had the same problem. When I switched from the gem ruby-postgres and
to postgres-pr, the problem went away. I'll admit, I don't understand
why, but I smiled when it worked. Earlier I did work around open SSL.
Back to the OpenSSL at this site:
Win32/Win64 OpenSSL Installer for Windows - Shining Light Productions. Here is one library
that they suggested get replaced (rename all “old” versions and use the
latest). On installation of OpenSSL I put the latest into c:\OpenSSL and
\Windows\system32. Here are the directories that I changed the file in
(libeay32.dll and ssleay32.dll to libeay32.dll.old):
• c:\instantrails\php
• c:\pgrails\bin
• c:\program files\pgOleDB
• c:\ruby\bin
• php (this could not be renamed? – in winzip file)
• c:\program files\postgresql\.3\bin
• c:\program files\psqlodbc\0803\bin
• ruby/bin (in use? – in winzip file)
Hopefully that helps someone (I spent several days working through
this).