I am trying to use a RDS database with my rails app since eventually I want to put it on heroku. (Database is about 10gb). I had trouble getting it to connect but it seems to be working. If I go into the console I can run sphinx searches and all that I need to but when I start the server it seems to freeze or something. If I click "About your application’s environment" nothing happens. I do not get any messages in the console or anything. If I try to go to another page it just tries loading the page but does not go anywhere.
Here is what my database.yml looks like.
# development:
# adapter: postgresql
# encoding: unicode
# database: musicbrainz_post
# pool: 5
# username: postgres
# password:
development:
adapter: mysql2
#encoding: utf8
host: musicbrainz.somestuff.amazonaws.com
#port: 3306
#reconnect: false
database: musicbrainz
username: myusername
password: mypass
If I comment out my old database configuration it works and the pages load and everything. But I want to use the amazon database.
Does anyone know why this is? Or is there another database/host I should be using?
Any help would be great!
After experiencing the same problem I found out what the problem was. The problem is that you need to use Ruby 1.9.3 as opposed to Ruby 1.8.7. I think the bug is occuring in the mysql2 gem.
Therefore the fix is to install Ruby 1.9.3. Here are the steps I followed:
NOTE: Before starting any of these steps, set up your terminal to "Run command as a login shell". For Ubuntu, open the terminal go to Edit -> Profile Preferences. Go to "Title and Command". Check the box next to "Run command as a login shell"
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With