diff --git a/Gemfile b/Gemfile index e7d85ba6d..1263c5032 100644 --- a/Gemfile +++ b/Gemfile @@ -16,7 +16,7 @@ gem 'cancan', '~> 1.6.7' gem 'compass', '~> 0.12.rc.0' gem 'compass-rails' # gem 'compass_twitter_bootstrap' -# gem 'dalli', '~> 1.0.2' +gem 'dalli', '~> 1.0.2' gem "friendly_id", "~> 3.3" gem 'haml', ">= 3.0.13"#, ">= 3.0.4"#, "2.2.21"#, @@ -34,12 +34,12 @@ gem 'paperclip', '~> 2.4.5' gem 'prawn', '~> 0.12.0' gem "rails3-generators", :git => "https://github.com/neocoin/rails3-generators.git" -gem 'rmagick', :require => 'RMagick' +gem 'rmagick', :require => 'RMagick' gem 'rake', '~> 0.9.2' gem 'state_machine', '~> 1.1.2' -#gem 'sunspot_solr' -#gem 'sunspot_rails', '~> 1.3.0rc' +gem 'sunspot_solr' +gem 'sunspot_rails', '~> 1.3.0rc' gem 'will_paginate', '~> 3.0.0' gem 'dynamic_form' diff --git a/app/models/product.rb b/app/models/product.rb index f5150c538..3c58c2a27 100644 --- a/app/models/product.rb +++ b/app/models/product.rb @@ -248,7 +248,7 @@ def sanitize_data end ## If you want to use SOLR search uncomment the following: -=begin +## =begin Product.class_eval do searchable do text :name, :default_boost => 2 @@ -268,4 +268,4 @@ def self.standard_search(args, params) end end end -=end +## =end diff --git a/config/environments/development.rb b/config/environments/development.rb index 0833ab500..e9f7cdc81 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -36,10 +36,10 @@ # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin - config.cache_store = :memory_store - - #config.cache_store = :dalli_store + #config.cache_store = :memory_store + config.cache_store = :dalli_store #config.cache_store = :redis_store + # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = false config.action_mailer.default_url_options = { :host => 'localhost:3000' } diff --git a/config/environments/production.rb b/config/environments/production.rb index 6100e8b4f..785177c8b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -57,8 +57,10 @@ # If you have no front-end server that supports something like X-Sendfile, # just comment this out and Rails will serve the files - config.cache_store = :memory_store - #config.cache_store = :dalli_store + #config.cache_store = :memory_store + config.cache_store = :dalli_store + # Use a different cache store in production + #config.cache_store = :mem_cache_store # See everything in the log (default is :info) # config.log_level = :debug @@ -66,9 +68,6 @@ # Use a different logger for distributed setups # config.logger = SyslogLogger.new - # Use a different cache store in production - # config.cache_store = :mem_cache_store - # Disable Rails's static asset server # In production, Apache or nginx will already do this config.serve_static_assets = false diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 5081ce105..26f24141c 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,4 +1,4 @@ -Hadean::Application.config.session_store :cookie_store, :key => '_ror_ecommerce_session_pIUHGFhsgbhsvgfshbdhgh456jb3hhy387u' +#REMOVE FOR DALLI: Hadean::Application.config.session_store :cookie_store, :key => '_ror_ecommerce_session_pIUHGFhsgbhsvgfshbdhgh456jb3hhy387u' puts ' ************************************************ @@ -10,8 +10,8 @@ # go to the Gemfile and add "gem 'dalli'" # bundle install ## Last UNCOMMENT the next 2 lines -# require 'action_dispatch/middleware/session/dalli_store' -# Hadean::Application.config.session_store :dalli_store, :key => '_hadean_session_ugrdr6765745ce4vy' +require 'action_dispatch/middleware/session/dalli_store' +Hadean::Application.config.session_store :dalli_store, :key => '_hadean_session_ugrdr6765745ce4vy' # # it is also recommended to change the cache store in config/environments/*.rb # config.cache_store = :dalli_store