Hello Brady Dowling,
I am new to using Rails combined with mysql.
This question is about the different environments. I have edited
config/database.yml as described and the well-know "Yay! You're on Rails!" can be seen in my browser now.
( somewhat confusing; since some place else I read that
mysql-ctl start was necessary. Is it, or is it not necessary at the start of a project? )
But this is only for development; what to do for :test and :production environments?
Especially a test environment is very necessary, to do Test Driven Development....
Is it OK to use the same setup for a test environment? I am not sure, since I recall having read somewhere that they can't be the same!
Extra information: I searched, came here and discovered this support page. But the direct motivation was, that I could not run tests.
The error message is:
ActiveRecord::StatementInvalid: Mysql2::Error: Table 'c9.recipes' doesn't exist: DELETE FROM
I thought there should be a test-table
c9.recipes ; build from the contents of the file
Apparently this does not work for me now, yet. What must I do; what am I missing?
UPDATE: I found the way to test, that seems to work:
Before testing, do
rails db:migrate RAILS_ENV=test