Обсуждение: two different posgres t for Rails development?

Поиск
Список
Период
Сортировка

two different posgres t for Rails development?

От
bitur mail
Дата:
Hello,

I was wondering if there would be a problem using Postgres 8.4 for my Rails development database and Postgres 8.1 for my production database.

8.1 is what is available with my shared web hosting provider, but 8.4 is the support (repo) version for my local Ubuntu machine.

I tried installing 8.1 from source on my local machine but apparently I still need a postgresql-client library that matches the Postgres version, and I can't seem to find that. So if there's no real issue going backward from 8.4 to 8.1, I'd like to just use Ubuntu's supported version for developing my Rails apps locally.

Thanks for any insight,
Derrick

Re: two different posgres t for Rails development?

От
Tom Lane
Дата:
bitur mail <biturmail@gmail.com> writes:
> I was wondering if there would be a problem using Postgres 8.4 for my Rails
> development database and Postgres 8.1 for my production database.

You can do it, if you're into pain ;-).

In the first place, there are quite a lot of features in 8.4 that aren't
in 8.1.  So you'll be frequently tripping over stuff that works fine in
your devel environment and fails when you put it in production.

The same goes from a performance standpoint: some queries that perform
well in 8.4 won't in 8.1.

And lastly, 8.1 will be EOL'd and no longer supported by the end of this
year.  So you really need to be thinking about migrating your production
DB to something newer, anyway.

http://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policy

            regards, tom lane

Re: two different posgres t for Rails development?

От
John R Pierce
Дата:
  On 08/28/10 10:59 AM, Tom Lane wrote:
> bitur mail<biturmail@gmail.com>  writes:
>> I was wondering if there would be a problem using Postgres 8.4 for my Rails
>> development database and Postgres 8.1 for my production database.
> You can do it, if you're into pain ;-).

does Rails even let you near the SQL ?  I thought it had a total ORM
abstraction layer that assumes all databases are more or less MySQL, and
it didn't let you anywhere near the actual relational aspects.







Re: two different posgres t for Rails development?

От
Rich Shepard
Дата:
On Sat, 28 Aug 2010, John R Pierce wrote:

> does Rails even let you near the SQL? I thought it had a total ORM
> abstraction layer that assumes all databases are more or less MySQL, and
> it didn't let you anywhere near the actual relational aspects.

   According to my software engineer partner, you're correct. It doesn't use
SQL, but it's own embedded language. And, while postgres can be used, he
prefers mysql and that's directly supported by Rails.

Rich

Re: two different posgres t for Rails development?

От
Adrian Klaver
Дата:
On Saturday 28 August 2010 12:50:32 pm Rich Shepard wrote:
> On Sat, 28 Aug 2010, John R Pierce wrote:
> > does Rails even let you near the SQL? I thought it had a total ORM
> > abstraction layer that assumes all databases are more or less MySQL, and
> > it didn't let you anywhere near the actual relational aspects.
>
>    According to my software engineer partner, you're correct. It doesn't
> use SQL, but it's own embedded language. And, while postgres can be used,
> he prefers mysql and that's directly supported by Rails.
>
> Rich

It uses SQL to do the actual communication with the db. That is hidden behind
Ruby(http://www.ruby-lang.org/en/) for programming and
YAML(http://www.yaml.org/) for configuration.  FYI Postgres is one of the three
suggested databases to use: http://guides.rubyonrails.org/getting_started.html

--
Adrian Klaver
adrian.klaver@gmail.com

Re: two different posgres t for Rails development?

От
Jeff Davis
Дата:
On Sat, 2010-08-28 at 12:50 -0700, Rich Shepard wrote:
> And, while postgres can be used, he
> prefers mysql and that's directly supported by Rails.
>

Although it seems more people use MySQL with rails than Postgres with
rails, they are both directly supported. And I believe that both have a
critical mass of users.

Regards,
    Jeff Davis