Displaying 20 results from an estimated 200 matches similar to: "Can't configure cach_store in an initializer"
2011 Apr 21
1
Rails 3 Foreign Domain routing - cannot get this to work!
Hello,
I''m trying to build an app (mysuperapp.com) that allows users to create
an account in which a default subdomain (IE: joeshmoe.mysuperapp.com) will
be
created as their homepage. In their profile settings, I also want to give
them the ability to add their own domain name so their homepage now can be
joeshmoe.com. I know this is possible in rails w/ plugins like
subdomainfu
2008 Jan 31
1
RSpec and the Basecamp API
I realise that this is kind of a basic question but I''m new to rspec and
still trying to work out how to do things. I''m working on a rails project
that requires basecamp integration via the api, which is fairly trivial to
use via the basecamp.rb wrapper:
Connection:
basecamp = Basecamp.new(APP_CONFIG[''api_host''], APP_CONFIG[''api_username''],
2008 Jun 23
1
updating to 2.1.0 using InstantRails2.0 - cache problem
hello. i''m trying to update to rails 2.1 using instant rails,
so i can use the new cache features, but when i try to
use the method "Rails.cache.write" in a controller, i
get the error
"undefined method `cache'' for Rails:Module (NoMethodError)"
and if i try to force the cache store to memory_store using
"ActionController::Base.cache_store =
2008 Apr 15
2
environment.rb uninitialized constant when starting console
I have the following code in environment.rb:
require File.join(File.dirname(__FILE__), ''boot'')
raw_config = File.read(RAILS_ROOT + "/config/config.yml")
APP_CONFIG = YAML.load(raw_config)[RAILS_ENV]
This works fine when running the server, but if I try and start a
console I get:
Loading development environment.
2008 Sep 28
4
Cannot expire cache from background process?
Hello,
I am trying to expire fragments (or at least trigger their expiration)
from a daemon that''s running in the background.
The daemon is updating all kinds of important lists every few minutes
from the background.
So I have to find some way to DO or TRIGGER the fragment caching from
this daemon.
Unfortunately just using the normal commands like:
expire_fragment :controller =>
2008 Sep 02
3
Unable to set default_url_options[:host] for Action Mailer
I am attempting to provide ActionMailer with the request host needed to
generate a url.
Here is my code:
In config/environments/development.rb
config.action_mailer.default_url_options = { :host =>
"development_url.com" }
and in config/environments/production.rb
config.action_mailer.default_url_options = { :host =>
"production_url.com" }
When I run the above code
2007 Oct 26
3
Selecting a database from the application itself?
Hi everybody,
I just started thinking about a project and am seeking some help
regarding its design.
The idea would be to create labels (i.e. address labels).I could let
users type the text manually, but I dont think they would appreciate
that when they''ll want to print 5000 addresses.
I can also probably let them import csv files, that should not be a
problem, but playing with those
2009 May 26
2
memcache for variables
hey,
for performance reasons i want to cache (template) variables using
memcache, making access to data easy in templates by using a simple
syntax like <%=users(2).name%>. this actually should tell the view to
load the field ''name'' from the model/table ''users'' with id=2. it first
tries memcache and if not found, loads the data from the and stores it
in
2006 Jan 30
1
find_by_sql and memcached
Is a find_by_sql query cached with memcached and cached_model
(http://dev.robotcoop.com/Libraries/)? Looks like the answer is no. Is
there a reason for this? I have a lot of very complicated querys with a
lot of unions, subquerys and joins that would greatly benefit from the
cache.
Going through the code I can see that the find_by_sql method is changed
in cached_model.rb, but it does not call
2010 Mar 31
1
Custom cache store – possible?
Hi.
I want to define my own cache store but I have no idea how to use in
my app.
Rails initializer reads environment config before loading app
initializers and plugins. So, i cant write:
config.cache_store = :my_beautiful_cache_store, ''localhost:641''
even if I put ActiveSupport::Cache::MyBeautifulCacheStore in config/
initializers.
Now i think it is impossible to define my
2009 Apr 09
4
uninitialized constant ActionView::Helpers::AssetTagHelper
Hi All,
I just wiped out my hard drive, did a fresh install of os x 10.5, and
upgraded to rails 2.3.2. i installed the mysql pkg for os x, and
created the databases i needed for the project i was working on before
the upgrade.
However when i run rake db:migrate to run my migrations i get this
error
uninitialized constant ActionView::Helpers::AssetTagHelper
I''ve found some stuff about
2008 Jun 23
12
From Instant Rails 2.0 to Rails 2.1.0
hi,
I have installed Instant Rails 2.0 on my machine which comes with
Rails 2.0.2. Now I want to update my Rails to version 2.1.0. So I do
gem update rails and It seems to be fine. But when I check the version
of my Rails I get the following message:
>rails -v
C:/RoR/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:578:in
`report_activate_error'': RubyGem version error: activesupport(2.0.2
not
2009 Nov 04
11
Sending Mails with mutations ä,ü,ö
Hi everyone
I am sending mails with rails in German. The Problem is that the German
letters ä,ü,ö are arriving correctly at the receiver.
When the subject contains the word
Für
the receiver gets
Für
Does anybody knows this issue?
Thanks in advance.
Adam
--
Posted via http://www.ruby-forum.com/.
2007 Aug 07
0
Edge Rails and ActionMailer problem (Bad file descriptor)
Hi,
I have just updated my rails app to use edge rails, however whenever I
attempt to send an email using action mailer, I gain the following
error, any suggestions t whats going wrong?
Bad file descriptor - connect(2)
I am using the following settings
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address =>
2009 Apr 13
6
Memcached 1.6.5 (Rails 2.3) 10x slower
The move to memcached_client 1.6.5 in Rails 2.3 seems to have made the
Rails cache about 10x slower. Since that''s the opposite effect I
would expect, I was hoping somebody would explain where I''m misreading
these numbers?
I noticed my fragment caching was slow -- it shouldn''t take 2ms just
to read a 2k string from a localhost memcached server:
Cached fragment hit:
2011 Jul 01
0
config.cache_store file path ignored?
Hi-
I have enabled caching in my application and am using the :file_store
option, as shown below (enabled in each environment).
config.cache_store = :file_store, "#{Rails.root}/public/cache"
Why is it that the file path I set is ignored? Everything seems to
get dumped out to /public, by default.
Thanks!
--
You received this message because you are subscribed to the Google Groups
2006 Jul 06
2
Custom init. of ActiveRecord objects - best practices
All,
I''m wanting to initialize an ActiveRecord object.
I understand that there is a method called after_initialize that appears
to get called right after the ActiveRecord object is instantiated.
Is after_initialize a Ruby thing or a Rails thing?
Where is after_initialize documented?
Can I pass parameters to it? If so, how?
I want to initialize the "belongs_to" attribute of
2010 Sep 07
0
numeric key in yam file to be used by config file
I am using a YAML file for my app config, loading it :
----
raw_config = File.read(RAILS_ROOT + "/config/app_config.yml")
APP_CONFIG = YAML.load(raw_config)[RAILS_ENV].symbolize_keys
---
It''s running well as long as I use alpha keys
development:
seve:
api_token: e09cba8653489749388797926512bb75
then APP_CONFIG[:seve]["api_token"] gives me
2009 Mar 25
1
I18n + ActionMailer = conflict ?
Hi there,
can anybody tell me why I get the error message:
"undefined method ''t'' for #<Mailer:0xb6d501e0>"
... when I call the following Mailer?
=================================
class Mailer < ActionMailer::Base
def signup_notification(user)
@recipients = "#{user.email}"
@from =
2006 Aug 09
7
function before_save
Hi everybody
I would like a function as the "before_save" method in the model. But it
must be the opposite. When I take out data from the database through the
model, I want to call a function before the data are available in the
controller.
Can anyone help me?
---- >>>> thx <<<< ----
--
Posted via http://www.ruby-forum.com/.