ruby - Rails deployment in production - always complain about dalli -
using can't rid of error when trying production deployment
could not find cache store adapter mem_cache_store (cannot load such file -- dalli) (runtimeerror)
i don't understand. far i've had no problem deploying in development, , if change copy /environments/development.rb
/environments/production.rb, still same message. have added gem
delli` in gemfile, still complains.
i don't know mem_cache_store
comes from, because when explicitely change :memory_store
:file_store
, error remains same
environments/production.rb
rails.application.configure config.cache_classes = true config.eager_load = true config.consider_all_requests_local = false config.action_controller.perform_caching = true config.serve_static_files = false config.assets.js_compressor = :uglifier config.assets.css_compressor = :sass config.assets.compile = false config.assets.digest = true config.assets.version = '1.0' config.force_ssl = true config.log_level = :debug actionmailer::base.smtp_settings = { :address => "localhost", } config.i18n.fallbacks = true config.active_support.deprecation = :notify config.cache_store = :memory_store config.log_formatter = ::logger::formatter.new end
capistrano deploy/production.rb
set :branch, :production set :stage, :production set :rails_env, 'production' set :deploy_to, '/var/www/******' set :log_level, :debug set :keep_releases, 5 set :bundle_without, %w{test development}.join(' ') set :bundle_flags, '--deployment --quiet'
full stack trace of error
could not find cache store adapter mem_cache_store (cannot load such file -- dalli) (runtimeerror) /var/www/intranet_rails_test/shared/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/cache.rb:106:in `rescue in retrieve_store_class' /var/www/intranet_rails_test/shared/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/cache.rb:104:in `retrieve_store_class' /var/www/intranet_rails_test/shared/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/cache.rb:60:in `lookup_store' /var/www/intranet_rails_test/shared/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/application/bootstrap.rb:76:in `block in <module:bootstrap>' /var/www/intranet_rails_test/shared/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec' /var/www/intranet_rails_test/shared/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run' /var/www/intranet_rails_test/shared/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers' /usr/local/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each' /usr/local/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component' /usr/local/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from' /usr/local/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component' /usr/local/lib/ruby/2.0.0/tsort.rb:180:in `each' /usr/local/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component' /usr/local/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each' /var/www/intranet_rails_test/shared/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers' /var/www/intranet_rails_test/shared/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!' /var/www/intranet_rails_test/releases/20150511202754/config/environment.rb:7:in `<top (required)>' config.ru:3:in `require' config.ru:3:in `block in <main>' /var/www/intranet_rails_test/shared/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `instance_eval' /var/www/intranet_rails_test/shared/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `initialize' config.ru:1:in `new' config.ru:1:in `<main>' /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:112:in `eval' /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:112:in `preload_app' /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:158:in `<module:app>' /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:29:in `<module:phusionpassenger>' /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:28:in `<main>'
using capistrano 3, rails 4.2
some gems need packages installed. dalli uses memcached. if need dalli please use package manager install it(apt-get, etc)
Comments
Post a Comment