I have a mac. sometimes that makes a difference, but this time I''m not so sure. I have installed the postgresql 9.1 from Enterprise DB with out a problem. Works great. Did one option in there to refuse network connections but that shouldn''t effect localhost connections. installed pg, eventually. Took me a while to figure out if this was the bestest of the many gems out there but this is what I went with. database.yml refers to the database adapter as postgres rake db:migrate requires that I install ''activerecord-postgres-adapter'' there is no such thing. But there seems to be several postings on the internet that says something like this configuration would work. What''s the current best practice for setting up postgresql? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sep 16, 2011, at 9:18 AM, Tom Allison wrote:> I have a mac. sometimes that makes a difference, but this time I''m not so sure. > > I have installed the postgresql 9.1 from Enterprise DB with out a problem. Works great. Did one option in there to refuse network connections but that shouldn''t effect localhost connections. > > installed pg, eventually. Took me a while to figure out if this was the bestest of the many gems out there but this is what I went with. > > database.yml refers to the database adapter as postgresadapter: postgresql (not postgres)> rake db:migrate requires that I install ''activerecord-postgres-adapter'' > there is no such thing. > > But there seems to be several postings on the internet that says something like this configuration would work. > > What''s the current best practice for setting up postgresql? > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
here''s my suggestion, note that my experience is on windows and linux only, not mac, but none of these steps should be different. This is based on a test app called "tom" and user named "tom" # create the rails app with the postrges db rails new tom -d postgresql # create a user on your pg environment that has permission to create new databases, # is not a superuser, and cannot create other roles. You''ll be prompted for a password to assign createuser -d -R -S -P tom # edit your database.yml file with the new user/password. Should look something like this: development: adapter: postgresql encoding: unicode database: tom_dev pool: 5 username: tom password: blahblah # create the database rake db:create # migrate and seed the database rake db:migrate rake db:seed Have fun! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/hJBwIqGPCtAJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 9/16/11 1:28 PM, Philip Hallstrom wrote:> > On Sep 16, 2011, at 9:18 AM, Tom Allison wrote: > >> I have a mac. sometimes that makes a difference, but this time I''m not so sure. >> >> I have installed the postgresql 9.1 from Enterprise DB with out a problem. Works great. Did one option in there to refuse network connections but that shouldn''t effect localhost connections. >> >> installed pg, eventually. Took me a while to figure out if this was the bestest of the many gems out there but this is what I went with. >> >> database.yml refers to the database adapter as postgres > > adapter: postgresql > > (not postgres) > >OMG do I feel dumb... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Use the ''pg'' gem: gem ''pg'' And in config/database.yml: development: adapter: postgresql database: my_checkins_development host: localhost Taken from a tutorial on my website: http://lassebunk.dk/2011/09/10/creating-a-location-aware-website-using-ruby-on-rails-and-postgis/ /Lasse 2011/9/17 Ivan Histand <ivan-Y9iDnarJvXfR7s880joybQ@public.gmane.org>> here''s my suggestion, note that my experience is on windows and linux only, > not mac, but none of these steps should be different. This is based on a > test app called "tom" and user named "tom" > > # create the rails app with the postrges db > rails new tom -d postgresql > > # create a user on your pg environment that has permission to create new > databases, > # is not a superuser, and cannot create other roles. You''ll be prompted > for a password to assign > createuser -d -R -S -P tom > > # edit your database.yml file with the new user/password. Should look > something like this: > development: > adapter: postgresql > encoding: unicode > database: tom_dev > pool: 5 > username: tom > password: blahblah > > > # create the database > rake db:create > > # migrate and seed the database > rake db:migrate > rake db:seed > > Have fun! > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/hJBwIqGPCtAJ. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, Sep 19, 2011 at 4:54 PM, Lasse Bunk <lassebunk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Use the ''pg'' gem: > > gem ''pg'' > > And in config/database.yml: > > development: > adapter: postgresql > database: my_checkins_development > host: localhost > > Taken from a tutorial on my website: > http://lassebunk.dk/2011/09/10/creating-a-location-aware-website-using-ruby-on-rails-and-postgis/ > > /LasseOnce I changed the adapter to the correct string (postgresql) it worked great. But I ran into a slightly different question. I''m struggling with UTF-8 encoding and was wondering if: 1) there is any real difference in postgresql between setting up en_US.UTF-8 and POSIX as far as being able to read/write anything? I''m thinking the answer is no. 2) when rails creates this database, is there some way I can add options to this yaml file to specify the encoding when it''s created? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> Use the ''pg'' gem: > > gem ''pg'' > > And in config/database.yml: > > development: > adapter: postgresql > database: my_checkins_development > host: localhost > > Taken from a tutorial on my website: http://lassebunk.dk/2011/09/10/creating-a-location-aware-website-using-ruby-on-rails-and-postgis/ > > /Lasse > > Once I changed the adapter to the correct string (postgresql) it worked great. > But I ran into a slightly different question. > > I''m struggling with UTF-8 encoding and was wondering if: > 1) there is any real difference in postgresql between setting up en_US.UTF-8 and POSIX as far as being able to read/write anything? I''m thinking the answer is no. > 2) when rails creates this database, is there some way I can add options to this yaml file to specify the encoding when it''s created?encoding: unicode -philip -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.