Scaffolding tries to connect to wrong db

Hello,

Im getting an error when trying to scaffold, rails tries to connect to
the wrong database, I am running RoR on windows.
When I try to acces localhost:3000/contexts I get this
Mysql::Error in ContextsController#index
#42000Unknown database ‘gtd_development’

This is my controller

class ContextsController < ApplicationController
scaffold :context
end

And this is my config/database.yml

development:
adapter: mysql
database: gtd
username: root
password:
host: localhost

test:
adapter: mysql
database: gtd_teste
username: root
password:
host: localhost

production:
development

How do I fix this?

And you have your RAILS_ENV environment variable set to “production”?


Jun-Dai Bates-Kobashigawa
purico.jp

Yes, I modified RAILS_ENV and it worked, good enough
thank you