Heroku Rails 3 Rails.cache.class reports ActiveSupport::Cache::FileStore after I call Rails.application.config.cache_store = :redis_store, “#{ur



Where url=redis://redistogo:XXXYYYZZZ@cod.redistogo.com:9362/


This is called in my initializer code.


Here is the other pertinent config options:


1) in production.rb


config.action_controller.perform_caching = true in my production.rb

2) In my controller:


caches_action :show, :layout => false, :if => Proc.new {|c| c.request.query_string.blank?}
caches_page :get_session_info

3) in the initializer:


Rails.application.config.cache_store = :redis_store, "#{url}"


Related to : Heroku Rails 3 Rails.cache.class reports ActiveSupport::Cache::FileStore after I call Rails.application.config.cache_store = :redis_store, “#{ur
Is ActiveSupport::Cache::MemoryStore cleared up rails restart with Passenger?
Network & Servers

I am pretty sure it does, but I wanted to double check, since I don't know exactly how Passenger restarts a rails app. So if I have something like:


Rails.cache.fetch(:my_obj) { MyObj.first }


will all the cache be cleared upon restart (which is my hope)?


My rails app's redis cache on Heroku
Network & Servers

I am trying to use Redis on Heroku.


I set like the following on initialiers.


redis_url = ENV["REDISTOGO_URL"] || "redis://127.0.0.1:6379/0/myapp"
RedisApp::Application.config.cache_store = :redis_store, redis_url
RedisApp::Application.config.session_store :redis_store, redis_server: redis_url

session works fine. But fragment cache gives an error.


ActionView::Template::Error (Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED)):

I believe that the cache is trying to access wrong location.


What mistake did I make?



How to get rails config.cache_store config in a Gem?
Network & Servers

So, I'm developing my first gem that needs some real connection with rails. It needs to know what is configured into config.cache_store. How do I get this info?


A little more background about it: it's a memcached manager(compatible only with Dalli gem, on it's first version) like resque-web for resque. I've tried reading resque code and it's case is different as it has a initializer for it and the Redis config is loaded from a yml file.


Thanks in advance.


Heroku Rails 3 Rails.cache.class reports ActiveSupport::Cache::FileStore after I call Rails.application.config.cache_store = :redis_store, “#{ur
Network & Servers

Where url=redis://redistogo:XXXYYYZZZ@cod.redistogo.com:9362/


This is called in my initializer code.


Here is the other pertinent config options:


1) in production.rb


config.action_controller.perform_caching = true in my production.rb

2) In my controller:


caches_action :show, :layout => false, :if => Proc.new {|c| c.request.query_string.blank?}
caches_page :get_session_info

3) in the initializer:


Rails.application.config.cache_store = :redis_store, "#{url}"


How can I clear rails cache after deploy to heroku?
Network & Servers

I applied cache to my heroku rails app and it works well.
But everytime I deploy to heroku, I also want to clear cache automatically.


so I googled and I found this.


task :after_deploy, :env, :branch do |t, args|
puts "Deployment Complete"
puts "Cleaning all cache...."
FileUtils.cd Rails.root do
sh %{heroku run console}
sh %{Rails.cache.clear}
end
end

but when I raked this script, it just show the heroku console command line but the Rails.cache.clear command does not typed. (I guess that is because heroku console is interactive)


and

script/console won't work; reports “Missing the Rails gem. Please `gem install -v= rails`…” even though rails shows as installe
Network & Servers

I'm trying to learn RoR, and running script/console fails, returning:


Loading development environment (Rails 2.3.5)
Missing the Rails gem. Please gem install -v= rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.


Both gem list and sudo gem list show rails (2.3.5) as installed. Additionally, script/server works fine. I found some sources that suggested the problem might be with rack (1.1.0), so I reverted back to 1.0.1, but it didn't help.


I'd love any s


Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .