2011-09-17 145 views
1

直升機,Rails3中耙分貝:遷移錯誤

我試圖運行耙分貝:使用mysql2寶石遷移我的Rails 3的應用。 但它以低於錯誤結束。 你有什麼想法嗎? 感謝

WARNING: This version of mysql2 (0.3.7) doesn't ship with the ActiveRecord adapter bundled anymore as it's now part of Rails 3.1 
WARNING: Please use the 0.2.x releases if you plan on using it in Rails <= 3.0.x 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/version.rb:4: warning: already initialized constant MAJOR 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/version.rb:5: warning: already initialized constant MINOR 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/version.rb:6: warning: already initialized constant BUILD 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/version.rb:3: warning: already initialized constant NUMBERS 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/version.rb:9: warning: already initialized constant VERSION 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake.rb:26: warning: already initialized constant RAKEVERSION 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/early_time.rb:17: warning: already initialized constant EARLY 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/alt_system.rb:32: warning: already initialized constant WINDOWS 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/application.rb:28: warning: already initialized constant DEFAULT_RAKEFILES 
WARNING: Possible conflict with Rake extension: String#ext already exists 
WARNING: Possible conflict with Rake extension: String#pathmap already exists 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/task_arguments.rb:73: warning: already initialized constant EMPTY_TASK_ARGS 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/invocation_chain.rb:49: warning: already initialized constant EMPTY 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/file_utils.rb:10: warning: already initialized constant RUBY 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/file_utils.rb:84: warning: already initialized constant LN_SUPPORTED 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/dsl_definition.rb:143: warning: already initialized constant Commands 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/file_list.rb:44: warning: already initialized constant ARRAY_METHODS 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/file_list.rb:47: warning: already initialized constant MUST_DEFINE 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/file_list.rb:51: warning: already initialized constant MUST_NOT_DEFINE 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/file_list.rb:55: warning: already initialized constant SPECIAL_RETURN 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/file_list.rb:61: warning: already initialized constant DELEGATING_METHODS 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/file_list.rb:364: warning: already initialized constant DEFAULT_IGNORE_PATTERNS 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake/file_list.rb:370: warning: already initialized constant DEFAULT_IGNORE_PROCS 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake.rb:64: warning: already initialized constant FileList 
/Users/Sako/.rvm/gems/[email protected]/gems/rake-0.9.2/lib/rake.rb:65: warning: already initialized constant RakeFileUtils 
rake aborted! 
stack level too deep 
+1

什麼版本的Rails寶石你使用? – Alex

回答

1

答案是錯誤消息:

WARNING: Please use the 0.2.x releases if you plan on using it in Rails <= 3.0.x 

只是修復您的Gemfile :)

+0

嗨apneadiving,謝謝你的建議。我已經將mysql gem降級到了0.2.7,但運行rake db之後:遷移它,​​問我0.3.7並推薦我運行bundle install ..回到零 – iwan

+0

你的rails和arel版本是什麼? – apneadiving

+0

rails 3.0.9,arel是什麼? – iwan

0

檢查的Gemfile的MySQL版本和3.0.0只需編輯軌版本到3.1.0和不關心mysql版本,保持它0.3.7,你不必降級它