设置capistrano和deprec后耙子被破坏

设置capistrano和deprec后耙子被破坏

问题描述:

问题已解决。设置capistrano和deprec后耙子被破坏

Deprec与应用程序无关。它的功能是准备服务器来接受应用程序。从我的gemfile中删除deprec解决了这个问题。

我不能在8小时内回答我自己的问题,所以我把它放在这里。


我最近安装Capistrano的和deprec为我的Rails 3应用程序,但现在耙不再起作用。

我想问题来自deprec,但我不确定为什么deprec与Rake任务有关。

在这里的任何帮助将不胜感激。

感谢, 乔恩

[email protected]:~/id$ rake --trace 

(in /home/jon/id) rake aborted! Please require this file from within a Capistrano recipe 

/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/capistrano-2.6.0/lib/capistrano/configuration/loading.rb:18:in `instance' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/deprec-2.1.19/lib/deprec/recipes/canonical.rb:10 /home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in `new_constants_in' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/deprec-2.1.19/lib/deprec/recipes_minus_rails.rb:5 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in `new_constants_in' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/deprec-2.1.19/lib/deprec/recipes.rb:6  
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in `new_constants_in' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/deprec-2.1.19/lib/deprec.rb:7 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `require'  
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `require' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `each' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `require' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `each' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `require' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.10/lib/bundler.rb:120:in `require' 
/home/jon/id/config/application.rb:7 
/home/jon/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require' 
/home/jon/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' 
/home/jon/id/Rakefile:4 /home/jon/.rvm/gems/ruby-1.8.7-p334/gems/rake-0.8.7/lib/rake.rb:2383:in `load' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/rake-0.8.7/lib/rake.rb:2000:in `run' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/rake-0.8.7/lib/rake.rb:1998:in `run' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/gems/rake-0.8.7/bin/rake:31 
/home/jon/.rvm/gems/ruby-1.8.7-p334/bin/rake:19:in `load' 
/home/jon/.rvm/gems/ruby-1.8.7-p334/bin/rake:19 

以下是相关文件:

Rake文件:

# Add your own tasks in files placed in lib/tasks ending in .rake, 
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 

require File.expand_path('../config/application', __FILE__) 
require 'rake' 

Id::Application.load_tasks 

application.rb中:

require File.expand_path('../boot', __FILE__) 

require 'rails/all' 

# If you have a Gemfile, require the gems listed there, including any gems 
# you've limited to :test, :development, or :production. 
Bundler.require(:default, Rails.env) if defined?(Bundler) 

module Id 
    class Application < Rails::Application 
    # Settings in config/environments/* take precedence over those specified here. 
    # Application configuration should go into files in config/initializers 
    # -- all .rb files in that directory are automatically loaded. 

    # Configure the default encoding used in templates for Ruby 1.9. 
    config.encoding = "utf-8" 

    # Configure sensitive parameters which will be filtered from the log file. 
    config.filter_parameters += [:password] 
    end 
end 

的Gemfile:

source 'http://rubygems.org' 

gem 'rails', '3.0.5' 
gem 'mysql2' 
gem 'haml' 
gem 'devise' 
gem 'carrierwave', :git => 'https://github.com/jnicklas/carrierwave.git' 
gem 'rmagick' 
gem 'face' 
gem 'capistrano' 
gem 'deprec' 

Deprec与应用程序无关。它的功能是准备服务器来接受应用程序。从我的gemfile中删除deprec解决了这个问题。

我加了这个,只是为了关闭这个问题