When I do a migration, the changes are make in the test db

When I do a migration, the changes are make in the test database. Does
anyone know the reason?

In the config/environment.rb file, I have this: ENV['RAILS_ENV'] ||=
'production'

And in the db/ folder, it creates a file named test.sqlite3

When I did the migrations, RoR used the test database, but when I want
to make something in the application, the migrations don´t appear
because the app is using the production database.

Please, help me.

When I do a migration, the changes are make in the test database. Does
anyone know the reason?

In the config/environment.rb file, I have this: ENV['RAILS_ENV'] ||=
'production'

And in the db/ folder, it creates a file named test.sqlite3

When I did the migrations, RoR used the test database, but when I want
to make something in the application, the migrations don´t appear
because the app is using the production database.

Is the environment variable RAILS_ENV set ?

Fred

Have you tried using:

rake db:migrate RAILS_ENV=production

-c

daphonz wrote:

Have you tried using:

rake db:migrate RAILS_ENV=production

-c

On May 18, 12:35�pm, Jorge alejandro Mendoza torres <li...@ruby-

I already tried the instruction and the migrations were made in the
production database.

But I have another problem, I had a record and I inserted others three
records to my table, if I make a search and I want to find one of three
new records, I can't find it, for instance:

var = Table.find(:first, :conditions => ["id_oficina = ?",
clave[i].to_i])

In my table, all records exist.

You would really have been be better to start a new thread for this.
Now the subject does not relate to your problem.
Have a look in the log file (development.log if you are in development
mode), it will show the sql being used. Does it look right?

How do you know it is not finding the record?

Colin