2012-01-15 8 views
8

मैं अपने रेल एप्लिकेशन को 3.2.0.rc2 में अपग्रेड करने का प्रयास कर रहा हूं लेकिन जब मैं rake db:migrate --trace करने का प्रयास करता हूंपता नहीं कैसे कार्य 'डीबी: माइग्रेट' w/Rails 3.2.0.rc2

DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionController::Base instead. (called from <top (required)> at /Users/Kyle/Desktop/skateparks-web/config/application.rb:4) 
rake aborted! 
Don't know how to build task 'db:migrate' 
/Users/Kyle/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/task_manager.rb:49:in `[]' 
/Users/Kyle/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:115:in `invoke_task' 
/Users/Kyle/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level' 
/Users/Kyle/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each' 
/Users/Kyle/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level' 
/Users/Kyle/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' 
/Users/Kyle/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level' 
/Users/Kyle/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run' 
/Users/Kyle/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' 
/Users/Kyle/.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run' 
/Users/Kyle/.rvm/gems/[email protected]/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>' 
/Users/Kyle/.rvm/gems/[email protected]/bin/rake:19:in `load' 
/Users/Kyle/.rvm/gems/[email protected]/bin/rake:19:in `<main>' 

प्रतिवाद चेतावनी application.rb में इस लाइन के संबंध में हो रहा है: अब निम्न त्रुटि संदेश हो रही

Bundler.require(:default, :assets, Rails.env) if defined?(Bundler) 

इस करने या निकालने के रेल के नवीनतम संस्करण में बदल माना जाता है? मैंने इस लाइन को हटाने की कोशिश की, और माइग्रेट फिर से चलाया। तब मुझे चेतावनी नहीं मिलती है लेकिन फिर भी Don't know how to build task 'db:migrate' त्रुटि मिलती है। कोई विचार?

एक bundle exec rake -T कर निम्नलिखित पैदावार:

DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionController::Base instead. (called from <top (required)> at /Users/Kyle/Desktop/skateparks-web/config/application.rb:4) 
rake about        # List versions of all Rails frameworks and the environment 
rake assets:clean      # Remove compiled assets 
rake assets:precompile     # Compile all the assets named in config.assets.precompile 
rake cron        # This task is called by the Heroku cron add-on 
rake doc:app        # Generate docs for the app -- also available doc:rails, doc:guides, doc:plugins (options: TEMPLATE=/... 
rake friendlyid:rebuild     # Updates all User and Skatepark friendly IDs 
rake geocode:all       # Geocode all objects without coordinates. 
rake jobs:work       # Alias for resque:work (To run workers on Heroku) 
rake log:clear       # Truncates all *.log files in log/ to zero bytes 
rake middleware       # Prints out your Rack middleware stack 
rake notes        # Enumerate all annotations (use notes:optimize, :fixme, :todo for focus) 
rake notes:custom      # Enumerate a custom annotation, specify with ANNOTATION=CUSTOM 
rake rails:template      # Applies the template supplied by LOCATION=(/path/to/template) or URL 
rake rails:update      # Update configs and some other initially generated files (or use just update:configs, update:scripts... 
rake resque:scheduler     # Start Resque Scheduler 
rake resque:work       # Start a Resque worker 
rake resque:workers      # Start multiple Resque workers. 
rake routes        # Print out all defined routes in match order, with names. 
rake secret        # Generate a cryptographically secure secret key (this is typically used to generate a secret for coo... 
rake sorcery:bootstrap     # Adds sorcery's initializer file 
rake spec        # Run all specs in spec directory (excluding plugin specs) 
rake spec:controllers     # Run the code examples in spec/controllers 
rake spec:helpers      # Run the code examples in spec/helpers 
rake spec:lib       # Run the code examples in spec/lib 
rake spec:mailers      # Run the code examples in spec/mailers 
rake spec:models       # Run the code examples in spec/models 
rake spec:rcov       # Run all specs with rcov 
rake spec:requests      # Run the code examples in spec/requests 
rake spec:routing      # Run the code examples in spec/routing 
rake spec:views       # Run the code examples in spec/views 
rake stats        # Report code statistics (KLOCs, etc) from the application 
rake sunspot:reindex[batch_size,models] # Reindex all solr models that are located in your application's models directory. 
rake sunspot:solr:run     # Run the Solr instance in the foreground 
rake sunspot:solr:start     # Start the Solr instance 
rake sunspot:solr:stop     # Stop the Solr instance 
rake test        # Runs test:units, test:functionals, test:integration together (also available: test:benchmark, test:... 
rake test:recent       # Run tests for {:recent=>"test:prepare"}/Test recent changes 
rake test:single       # Run tests for {:single=>"test:prepare"} 
rake test:uncommitted     # Run tests for {:uncommitted=>"test:prepare"}/Test changes since last checkin (only Subversion and... 
rake time:zones:all      # Displays all time zones, also available: time:zones:us, time:zones:local -- filter with OFFSET para... 
rake tmp:clear       # Clear session, cache, and socket files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tm... 
rake tmp:create       # Creates tmp directories for sessions, cache, sockets, and pids 

ऐसा लगता है मानो मेरी rake db कार्यों के सभी याद कर रहे हैं।

+0

बंडल निष्पादन रेक क्या कहता है? – phoet

+0

मेरे प्रश्न w/आउटपुट अपडेट किया गया। ऐसा लगता है कि सभी 'रेक डीबी' कार्य गायब हैं। –

+3

क्या आप अपने आवेदन.आरबी में 'आवश्यकता' रेल/सभी 'करते हैं या आप एक सबसेट लोड कर रहे हैं? –

उत्तर

14

आपके मणि संस्करणों के साथ कुछ बहुत ही मजेदार चल रहा है। यदि आप अपने gemfile को देखते हैं। इसे Railties के 3.2.rc2 संस्करणों का उपयोग कर रहा है, सक्रियण और सक्रिय मॉडल लेकिन अन्य संस्करण सभी जगह पर हैं (ar 1.6 है, एक्शन मेलर 0.6.1 आदि है)।

मुझे यकीन है कि कैसे आप इस राज्य में मिला नहीं हूँ, लेकिन मैं कोशिश करता हूँ या तो bundle update या Gemfile.lock को हटाने और फिर bundle install चल (सिद्धांत में उन 2 बराबर हैं) और रेल आप चाहते हैं की सटीक संस्करण को निर्दिष्ट (खासकर जब आप रेल के प्रीरलीज़ संस्करण के बाद हैं।)

+0

पर मेरी प्रोजेक्ट को देखने के लिए स्वतंत्र महसूस करें ऐसा प्रतीत होता है क्योंकि मैं अपने जेमफाइल में स्पष्ट रूप से '3.2.0.rc2' निर्दिष्ट नहीं कर रहा हूं। मैंने माना कि सिर्फ 'मणि रेल' डालना पर्याप्त होगा लेकिन मुझे नहीं लगता। क्या यह एक बग डब्ल्यू/रेल हो सकता है? –

+0

यदि यह किसी भी चीज़ में एक बग है तो यह बंडलर में होगा। उन्होंने कहा कि चुने गए रत्नों के सेट को सख्ती से बोलना आपके जीमेलफ़ाइल से मेल खाता है (संभवतः क्योंकि कुछ पुराने संस्करण निर्दिष्ट संस्करणों के बारे में अधिक आराम से थे) –

+0

Gemfile.lock + बंडल इंस्टॉल को हटाने से परिपूर्ण काम किया गया। चीयर्स। –

5

rake db:migrate --trace कमांड से, रेक कार्य लोड नहीं होते हैं। , एमडी आप पथ योजना सही नहीं मिल सका। और चल रहे rake -T स्थानीय स्तर पर db:migrate को रेक कार्यों में से एक के रूप में सूचीबद्ध करें? यदि नहीं, तो आपकी रेल गलत कॉन्फ़िगर की गई है ... अच्छी तरह से, मैंने रेल 3.2.0rc2 के साथ काम नहीं किया, लेकिन मैंने कुछ गुमराह किया और मुझे कुछ लिंक मिल गए। कृपया उल्लेख इस नीचे दिए गए लिंक आप में मदद मिलेगी ..

Rake db:migrate error don't know how to build task

Don't know how to build rake db:migrate on Ubuntu natty

Problem running rake db:migrate

मुझे पता है कि यह कैसे काम करते हैं!

धन्यवाद फ्रेडरिक, इसकी दिलचस्प पोस्ट ..

+1

धन्यवाद, इस उत्तर के लिए। यह मेरे लिए काम करता है। – gsoni

संबंधित मुद्दे