嗨我只是想知道如果我的數據庫連接的配置是正確的rubyonrails mysql2
development:
adapter: mysql2
encoding: utf8
database: db/glob_development
pool: 5
username: root
password: mysql
host: localhost
socket: /tmp/mysql.sock
timeout: 5000
,因爲當我嘗試運行rake:DB:創建
它是這樣的
WARNING: This version of mysql2 (0.2.17) isn't compatible with Rails 3.1 as the ActiveRecord adapter was pulled into Rails itself.
WARNING: Please use the 0.3.x (or greater) releases if you plan on using it in Rails >= 3.1.x
DEPRECATION WARNING: Arel::Visitors::VISITORS is deprecated and will be removed. Database adapters should define a visitor_for method which returns the appropriate visitor for the database. For example, MysqlAdapter.visitor_for(pool) returns Arel::Visitors::MySQL.new(pool). (called from mon_synchronize at /home/led/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201)
db/test.sqlite3 already exists
db/production.sqlite3 already exists
即時通訊在fedora15中運行 1.9.2p290 ruby版本 rails 3.1.1
編輯
只需下載mysql2與和改變我的Gemfile
gem 'mysql2', '~>0.3.10'
嚴正只是想知道 終端天天說
db/glob_development already exists
db/test.sqlite3 already exists
db/production.sqlite3 already exists
但我的數據庫文件夾dosent有無glob_development文件是錯誤還是很自然的?抱歉,傢伙
感謝回覆它已經是他們已經愚蠢的我:)順便說一下我的配置好嗎?我不知道/tmp/mysql.sock thingy對不起:( – Led
是的。如果你對這個「...已經存在」的問題有疑問,應該在Rails 3.1中解決(https://github.com/rails/ rails/issues/899)。只要確定你已經得到了ruby 1.9.2或ruby 1.9.3,rails 3.1;運行「bundle install」來更新gem;並確保你正在閱讀的任何教程參考ruby 1.9(和不是1.8)如果這是你的環境 –