Я пытаюсь поиграть с разными жемчужинами сообщений, которые все используют. Поэтому, после установки Devise на основную ветку git, я извлек новую ветку, чтобы попробовать один гем "rails messaging" https://github.com/frodefi/rails-messaging,, и когда я не смог заставить его работать, я зафиксировал изменения в этой ветке, и затем я вернулся к мастеру и проверил новую ветку, чтобы попробовать другой гем "mailboxer" https://github.com/ging/mailboxer/tree/master/lib. В файле gemfile этой новой ветки не было никаких следов драгоценных камней из первой ветки, однако, когда я попробовал рейк db: перенос для этой второй ветви после установки гемов, я получил это сообщение об ошибке, которое, казалось, предполагало, что таблица из первой ветви вмешивалась в грабли второй ветви, если только
rails g mailboxer:install
Он автоматически запускает грабли db: migrate. Однако README говорит, что мне нужно запустить rake db: migrate, так что я не уверен ...
rake aborted!
An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: table "conversations" already exists: CREATE TABLE "conversations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subject" varchar(255) DEFAULT '', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL
)
Кто-нибудь может подсказать, как я могу обойти это? Я действительно не знаю, какие команды запустить, чтобы понять это.
Это файл sche.rb. Основываясь на индексе «пользователи сообщений», я предполагаю, что это установка, созданная гемом сообщений rails (в первой ветви), но я не совсем уверен. Я посмотрел исходный код на git, но немного потерян, потому что я не очень опытен.
ActiveRecord::Schema.define(:version => 20120302041333) do
create_table "conversations", :force => true do |t|
t.string "subject", :default => ""
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "messaging_users", :force => true do |t|
t.string "email", :default => "", :null => false
t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "messaging_users", ["email"], :name => "index_messaging_users_on_email", :unique => true
add_index "messaging_users", ["reset_password_token"], :name => "index_messaging_users_on_reset_password_token", :unique => true
create_table "notifications", :force => true do |t|
t.string "type"
t.text "body"
t.string "subject", :default => ""
t.integer "sender_id"
t.string "sender_type"
t.integer "conversation_id"
t.boolean "draft", :default => false
t.datetime "updated_at", :null => false
t.datetime "created_at", :null => false
t.integer "notified_object_id"
t.string "notified_object_type"
t.string "notification_code"
end
add_index "notifications", ["conversation_id"], :name => "index_notifications_on_conversation_id"
create_table "receipts", :force => true do |t|
t.integer "receiver_id"
t.string "receiver_type"
t.integer "notification_id", :null => false
t.boolean "read", :default => false
t.boolean "trashed", :default => false
t.boolean "deleted", :default => false
t.string "mailbox_type", :limit => 25
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "receipts", ["notification_id"], :name => "index_receipts_on_notification_id"
create_table "users", :force => true do |t|
t.string "email", :default => "", :null => false
t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at"
t.datetime "updated_at"
t.string "name"
end
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
end