Posted 18 September 2011 - 06:37 PM (#1)
Languages: PHP | JS | Ruby | Rails | C# | Python | Java
Posted 18 September 2011 - 06:46 PM (#2)
ShanePerreault, on 18 September 2011 - 06:37 PM, said:
pg = PostgreSQL, what their DBs are. I have no idea if you can use MySQL, but what you can do is:
gem 'mysql', :group => [:development, :test] gem 'pg', :group => [:production]
but you'll want to run your test suite against it for PG SQL errors, etc. so best to switch, it is much faster with AR anyways.
Posted 18 September 2011 - 07:34 PM (#3)
ThatRailsGuy, on 18 September 2011 - 06:46 PM, said:
gem 'mysql', :group => [:development, :test] gem 'pg', :group => [:production]
but you'll want to run your test suite against it for PG SQL errors, etc. so best to switch, it is much faster with AR anyways.
I understand it's a PostgreSQL database, and I'm using ActiveRecord. I just can't figure how to a) get my db info from heroku b) run the migrations and c) connect.
Languages: PHP | JS | Ruby | Rails | C# | Python | Java
Posted 18 September 2011 - 07:49 PM (#4)
ShanePerreault, on 18 September 2011 - 07:34 PM, said:
heroku rake db:migrate
heroku rake db:pull
http://blog.heroku.c...nd_from_heroku/
Posted 18 September 2011 - 08:54 PM (#5)
group :development, :test do gem 'mysql2', '<= 0.2.9' end group :production do gem pg end
As for connecting to your db in Heroku, you can't access a Heroku shared db's data remotely. Not easily anyway.
If it is just populating your db with initial records that you're concerned about, then you would probably just use the db/seeds.rb file for that.
Posted 19 September 2011 - 06:07 AM (#7)
gushort, on 18 September 2011 - 08:54 PM, said:
group :development, :test do gem 'mysql2', '<= 0.2.9' end group :production do gem pg end
As for connecting to your db in Heroku, you can't access a Heroku shared db's data remotely. Not easily anyway.
If it is just populating your db with initial records that you're concerned about, then you would probably just use the db/seeds.rb file for that.
I'm mainly talking about populating my database.yml file.
Languages: PHP | JS | Ruby | Rails | C# | Python | Java
Posted 19 September 2011 - 11:40 AM (#8)
gushort, on 18 September 2011 - 08:54 PM, said:
group :development, :test do gem 'mysql2', '<= 0.2.9' end group :production do gem pg end
As for connecting to your db in Heroku, you can't access a Heroku shared db's data remotely. Not easily anyway.
If it is just populating your db with initial records that you're concerned about, then you would probably just use the db/seeds.rb file for that.
Don't use different dbs, NEVER! PG has different JOINs, etc. so if you won't get those errors in production, use it in development and testing so you get those errors earlier in the stage.
Posted 07 October 2011 - 11:46 AM (#9)
ThatRailsGuy, on 19 September 2011 - 11:40 AM, said:
Thanks for the "heads up". I've been using MySQL, as it is what seemed to be the standard, but Heroku uses PG, so I've been installing PG onto my system (what a pain - even with Homebrew), and intend to stick with that.
Posted 07 October 2011 - 01:21 PM (#10)
gushort, on 07 October 2011 - 11:46 AM, said:
You don't have to install PG, Rails will automatically use SQLite if you don't have it.
Quote
Posted 07 October 2011 - 05:51 PM (#11)
Mo3, on 07 October 2011 - 01:21 PM, said:
1) It's not automatic
2) please see convo
Posted 07 October 2011 - 06:19 PM (#12)
Mo3, on 07 October 2011 - 01:21 PM, said:
I wanted to install it anyway, so I could easily access data in my Heroku backups.
Posted 07 October 2011 - 09:31 PM (#13)
Quote
If you knew that your live server would be using PostgreSQL, why would you be using MySQL for development? Surely it'd be a lot easier to use PostgreSQL for both?
Quote
MySQL and PostgreSQL are both very commonly used. I'd say that PostgreSQL is better as it's more powerful, but it is harder to set up. Its support for stored procedures is significantly better than that of MySQL, for one. Stored procs are very important for large systems.

Repeat after me: jQuery is not JavaScript. It is not the answer to every JavaScript-related question. When you have to write some JavaScript, do not instantly react with "Oh, I'll do that with jQuery!"






Cartoon Clouds
Mountains
Sunrise
Clouds
Green Clouds
None















Help