rake db:migrate not working when using ActiveRecord with Sinatra
问题 I am trying to create a very basic Sinatra app which uses only Active Record and Sqlite3. To be as complete as possible I am following instructions from a tutorial which states the following steps in order: Create a database by putting the following code in the main app file: ActiveRecord::Base.establish_connection( :adapter =>'sqlite3', :database=>'wiki.db' ) class User < ActiveRecord::Base validates :username, presence: true, uniqueness: true validates :password, presence: true end To