The problem is that you do not fill out your database when you migrate to another server.
There are several options to solve this problem.
The first . Add to the end of the file with user model migrations (db / migrate / _timestamp_create_users.rb or something like that) something like this:
User.create(:name => "vasya", :pass => "pupkin")
Thus, after creating the database, writing to the database will immediately take place.
But this is a very bad option, do not do it.
The second option . Create your own rake task (task) that will do everything you need.
Custom rake tasks should be put here: lib/tasks/
An example of a task that will help you
namespace :app do desc "Setup production database" task :setup => :environment do # Create Users User.create!(:email => 'admin@example.com', :password => 'passw0rt') end end
In order to run this task you need to perform actions you already know.
bundle exec rake app:setup
These steps need to be done after you have already migrated.
The third option . To migrate existing data to another server, use gem'om yaml_db . This solution works independently of the database, you can migrate, for example, from sqlite3 to mysql or postgres without any special problems.
PS To begin with, I would advise the author to sort out a little with the gaps in knowledge.
PPS Other answers received minuses due to the fact that this is not a solution to the problem, but a crutch, oh bad by the way.