ruby - 无法加载此类文件 - carrierwave / test / matchers(LoadError)

时间:2017-03-02 16:37:14

标签: ruby ruby-on-rails-3 carrierwave

当我尝试使用

在生产模式下启动我的应用时
ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu] 

我收到此错误消息:

App 2573 stdout: 
App 2573 stdout: 
[ 2017-03-02 17:25:14.0557 3275/7f53fa308700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/www/schuyfotografie: An error occurred while starting up the preloader.
  Error ID: a2afda2e
  Error details saved to: /tmp/passenger-error-3w7DsJ.html
  Message from application: cannot load such file -- carrierwave/test/matchers (LoadError)
  /var/lib/gems/2.1.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
  /var/lib/gems/2.1.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
  /var/lib/gems/2.1.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
  /var/lib/gems/2.1.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
  /var/lib/gems/2.1.0/gems/carrierwave-0.10.0/lib/carrierwave.rb:81:in `<top (required)>'
  /var/lib/gems/2.1.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:76:in `require'
  /var/lib/gems/2.1.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
  /var/lib/gems/2.1.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:72:in `each'
  /var/lib/gems/2.1.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:72:in `block in require'
  /var/lib/gems/2.1.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:61:in `each'
  /var/lib/gems/2.1.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:61:in `require'
  /var/lib/gems/2.1.0/gems/bundler-1.9.1/lib/bundler.rb:134:in `require'
  /home/www/schuyfotografie/config/application.rb:7:in `<top (required)>'
  /home/www/schuyfotografie/config/environment.rb:2:in `require'
  /home/www/schuyfotografie/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /var/lib/gems/2.1.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
  /var/lib/gems/2.1.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /var/lib/gems/2.1.0/gems/passenger-5.1.2/src/helper-scripts/rack-preloader.rb:110:in `eval'
  /var/lib/gems/2.1.0/gems/passenger-5.1.2/src/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /var/lib/gems/2.1.0/gems/passenger-5.1.2/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /var/lib/gems/2.1.0/gems/passenger-5.1.2/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /var/lib/gems/2.1.0/gems/passenger-5.1.2/src/helper-scripts/rack-preloader.rb:29:in `<main>'

配置/ application.rb中

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

require 'rails/all'

if defined?(Bundler)
  # If you precompile assets before deploying to production, use this line
  Bundler.require(*Rails.groups(:assets => %w(development test)))
  # If you want your assets lazily compiled in production, use this line
  # Bundler.require(:default, :assets, Rails.env)
end

module Vorlage
  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.

    # Custom directories with classes and modules you want to be autoloadable.
    # config.autoload_paths += %W(#{config.root}/extras)

    # Only load the plugins named here, in the order given (default is alphabetical).
    # :all can be used as a placeholder for all plugins not explicitly named.
    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]

    # Activate observers that should always be running.
    # config.active_record.observers = :cacher, :garbage_collector, :forum_observer

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
    # config.time_zone = 'Central Time (US & Canada)'

    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
    config.i18n.default_locale = :de
    I18n.locale = config.i18n.locale = config.i18n.default_locale

    # 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]

    # Enable escaping HTML in JSON.
    config.active_support.escape_html_entities_in_json = true

    # Use SQL instead of Active Record's schema dumper when creating the database.
    # This is necessary if your schema can't be completely dumped by the schema dumper,
    # like if you have constraints or database-specific column types
    # config.active_record.schema_format = :sql

    # Enforce whitelist mode for mass assignment.
    # This will create an empty whitelist of attributes available for mass-assignment for all models
    # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
    # parameters by using an attr_accessible or attr_protected declaration.
    config.active_record.whitelist_attributes = true

    # Enable the asset pipeline
    config.assets.enabled = true

    # Version of your assets, change this if you want to expire all your assets
    config.assets.version = '1.0'
  end
end

我的gemfile看起来像这样:

    source 'https://rubygems.org'

# ruby '1.9.3'
gem 'rails', '3.2.13'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'


# Gems used only for assets and not required
# in production environments by default.
group :assets do  
    gem 'coffee-rails', '~> 3.2.1'
    # See https://github.com/sstephenson/execjs#readme for more supported runtimes
    gem 'therubyracer', '0.12.3', :platforms => :ruby
    gem 'uglifier', '2.5.3'
    gem 'jquery-datatables-rails', '3.2.0'
    gem 'jquery-fileupload-rails', '0.4.7'
end

gem 'activeadmin', '0.5.1'
gem 'afm', '0.2.2'
# gem 'activemodel', '3.2.12'
gem 'activesupport', '3.2.13'
gem 'arbre', '1.0.3'

gem 'builder', '3.0.4'
#gem 'bundler', '1.3.5' #Unsicher ob man den braucht?
gem 'bcrypt-ruby', '3.0.1', :require => "bcrypt"
gem 'bourbon', '3.1.8'
gem 'best_in_place', '2.1.0'

#gem 'capistrano', '2.13.5'
gem 'carrierwave', '0.10.0'
#gem 'chronic', '0.9.0'
gem 'ckeditor', '4.1.3'
gem 'coffee-script-source', '1.8.0'
gem 'coffee-script', '2.3.0'
gem 'climate_control', '0.0.3'

gem 'daemons', '1.1.9'
gem 'daemon_controller', '1.2.0'
gem 'devise', '3.5.10'

gem 'execjs', '1.4.0'

gem 'faraday', '0.9.1'
gem 'formtastic', '2.3.1'

# gem 'google_drive', '0.3.3'

gem 'hike', '1.2.2'
gem 'highline', '1.7.1'
gem 'hashery', '2.1.2'

gem 'inherited_resources', '1.6.0'
gem 'i18n', '0.6.1'

gem 'jwt', '1.5.1'
gem 'jquery-rails', '2.3.0'
gem 'json', '1.8.2'

gem 'kaminari', '0.16.1'

#gem 'libv8', '3.16.14.7'

gem 'mime-types', '1.19'
# gem 'mysql2', '0.3.11'
gem 'multi_json', '1.11.0'
gem 'multi_xml', '0.5.5'
gem 'mini_magick', '3.7.0'
gem 'multipart-post', '2.0.0'
gem 'mail', '2.5.4'

gem 'net-ssh', '2.9.2'
gem 'net-scp', '1.2.1'
gem 'net-sftp', '2.1.2'
gem 'net-ssh-gateway', '1.2.0'
gem 'nokogiri', '1.6.6.2'

gem 'oauth2', '1.1.0'
gem 'orm_adapter', '0.5.0'

gem "prawn", '2.1.0'

gem 'rack', '1.4.5'
gem 'rack-ssl', '1.3.2'
gem 'rack-cache', '1.6.1'
gem 'rake', '10.1.0'
gem 'rdoc', '3.12'
gem "redactor-rails", "~> 0.4.3"
gem 'ref', '1.0.5'
gem 'rmagick', '2.16.0'
gem 'rack-test', '0.6.2'
gem 'rubyzip', '0.9.9', :require => 'zip/zip'

gem 'sass', '3.4.17'
gem 'sass-rails', '3.2.6'
gem 'sqlite3', '1.3.9'
gem 'sprockets', '2.2.2'

gem 'treetop', '1.4.12'
gem 'tzinfo', '0.3.35'
gem 'tilt', '1.3.3'
gem 'thread_safe', '0.3.5'
gem 'thor', '0.16.0'
gem 'ttfunk', '1.4.0'

gem 'whenever', '0.9.2'
gem 'warden', '1.2.6'
# gem 'will_paginate', "3.0.pre2"

gem 'xml-simple', '1.1.4', :require => 'xmlsimple'

捆绑安装工作很好。我的提供程序从ruby 1.9.3切换到2.1,从那时起我就遇到了这个问题(我还需要更改一些gem的版本来传递bundle install)。有谁知道这意味着什么?

谢谢,安德烈亚斯

0 个答案:

没有答案