Displaying 20 results from an estimated 2000 matches similar to: "Weird problem with TimeZone::adjust and TimeZone::unadjust. Please help."
2006 Jan 30
1
Introduction & time_zone_select with mapped TimeZone question
I''m new to this list, I''m a student in History, Computerscience and a
bit of Philosophy from the Netherlands... I have started using rails a
few weeks ago, I did read the Agile Webdevelopment with Rails book, and
I generally started to love Rails for it''s sheer beauty and intelligent
structure...
However I came across something that puzzles me quite a bit. It''s
2006 Mar 16
5
TimeZone, TZInfo, daylight savings, and composed_of
Does anyone know the best way to track time zone information. There doesn''t
seem to be much documentation on this. So far it seems like a simple db
field like
create table accounts (
id int unsigned not null auto_increment,
name varchar(50) not null,
time_zone varchar(50) not null,
...
primary key (id)
)
and a class like
class Account < AR
...
2007 Apr 03
1
Some timezone trouble involving tzinfo and postgresql
Friends,
So there I was, minding my own business, trying to make my rails app
timezone aware (DST, as well), since it''s all about the timing with
this one. There are a number of excellent articles that I''ve been
working off of, in particular this one internet archived version of
Scott Barron''s very useful article on the subject that is no longer
available at the
2006 Jul 17
2
after_save deletes is an exception is raised?
Does after_save in a model delete if an exception is raised in there?
I simply did
def after_save
raise ''hmmm''
end
and it raised the exception but there was nothing in the database. I
removed that entire method and its in the database. Is this correct?
Thank You,
Ben Johnson
E: bjohnson@contuitive.com
-------------- next part --------------
An HTML attachment was
2006 Jul 17
1
Using UTC as the time zone?
I read in the rails recipes book that it is best to store times as
UTC in the database. How do I do this? My server is located in GMT -6
CST. Do I need to change my server to use UTC or what?
Thanks for your help.
Thank You,
Ben Johnson
E: bjohnson@contuitive.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jul 17
1
RJS template help
Does anyone know where I can find good documentation on how to use
RJS template. I know I can do various things with the page object:
page.visual_effect :shake, ''some_id''
Is there a list of method I can run on the page onject and what
parameters they are expecting? I can''t find this anywhere.
Thanks for your help.
Thank You,
Ben Johnson
E: bjohnson@contuitive.com
2006 Jul 22
4
Accessing the controller name in your views?
I need to know what controller and action the user is currently in
to do various things in my layouts/application.rhtml file. Isn''t
there is a better way than:
<% if params[:controller] == "whatever" && params[:action] ==
"whatever" %>some html<% end %>
I know in the controllers you can just use controller_name, but that
is not provided
2006 Jul 17
2
Very strange after_save problem. Please help.
I have a very strange problem here. I do not get this. So any help is
greatly appreciated.
Basically I have a model that calls a method in the background
process in the "after_save" method. Let''s call the model products. So
what happens is this:
1. I create a new product.
2. Everything works and the product is saved with id 13.
3. A method is called in my background
2006 Aug 24
1
ActionMailer doesn''t work in backgroundrb
I am pretty confident that mailers do not work in backgroundrb. Can
anyone confirm this? Because when I try to do
Notifier.deliver_some_method I get an error saying it cant find the
templates for my email. The funny thing is that when I run script/
runner Notifier.deliver_some_method it works just fine. Any ideas?
Thank You,
Ben Johnson
E: bjohnson at contuitive.com
O: 800-341-6826
M:
2006 Jul 31
1
Creating workers on server startup?
I have workers that need to be created when I run rake
backgroundrb:start. Where do I put this code?
Thanks for your help.
Thank You,
Ben Johnson
E: bjohnson at contuitive.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060731/d201c052/attachment.html
2006 Jul 31
1
delete_worker doesn''t kill the thread?
I made a worker that run an infinite loop and does the following:
while true
@logger << "logging #{Time.now}"
sleep 2
end
In my secong console I did:
tail log/backgroundrb.log -f
This is so I could see the line getting added to the log every 2
seconds.
Then in my other console I started script/console and created a new
worker. Then killed it with
2006 Jul 11
1
Determine if attributes changed?
Is there a way to determine if attributes were changed? Let''s say in
the before_save or after_save method?
Thanks for your help.
Thank You,
Ben Johnson
E: bjohnson@contuitive.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060711/442b20d2/attachment.html
2006 Aug 06
3
Debugging a worker?
If there is an exception raised in my worker I rescue it and throw it
into the log. This is decent, but it would really help to find out
more information. Like the line number, the stack trace, etc. Is this
possible?
Thanks for your help.
Thank You,
Ben Johnson
E: bjohnson at contuitive.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jul 19
1
How to add validation to in_place_editor
I have a simple question, but can''t seem to figure this out.
I added an in place editor field and didn''t like how it didn''t use
the save method. It uses the update_attribute method which does not
run validation, etc. So I just added the method in my controller myself:
def set_event_url
begin
@event = Event.find params[:id]
@event.url =
2006 Jul 22
3
How to use variables in your layout views?
Let''s say I wanted to find 3 products from my database and put them
in the layouts/application.rhtml view. Where do I find these 3
products? Do I just do it in application.rhtml?
<% for product in Product.find(:all, :limit => 3) %>
Because I was under the impression that you really don''t want to do
this in your views. You should do this in your controllers and
2006 Aug 19
1
Setting the process priority?
Is it possible to make the process priority higher for backgroundrb?
Thank You,
Ben Johnson
E: bjohnson at contuitive.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060819/7a2e6d1b/attachment.html
2006 Jul 07
2
Problems installing, please help
I am in my rails project directory and I ran the following command:
script/plugin install svn://rubyforge.org//var/svn/backgroundrb
and I get this:
sh: svn: command not found
Any idea how I can install backgroundrb or what the problem is?
Any help is greatly appreciated.
Thank You,
Ben Johnson
E: bjohnson at contuitive.com
O: 800-341-6826
M: 817-229-4258
-------------- next part
2006 Jul 07
1
uninitialized constant MiddleMan
I just updated backgroundrb to the latest version, and now I get this:
uninitialized constant MiddleMan
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/
active_support/dependencies.rb:123:in `const_missing''
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/
active_support/dependencies.rb:131:in `const_missing''
2006 Jul 19
1
Passing objects to drb, does it keep the existing db connection?
I have a simple question. Let''s say I do this in one of my models:
after_save
drb_conn.some_method(self)
end
When that object gets over to the background process is it the exact
same as?....
Model.find some_id #in the background process
As far as my background process is concerned passing the object is
not any different than passing the id and using the find method?
Because
2006 Jul 31
1
Please help, if @jobs[key].respond_to? :thread is returning false
I noticed in the BackgroundRB class in the delete_worker method there
is a line:
if @jobs[key].respond_to? :thread
For some reason this is returning false for me, it gets down to this
line and returns false, not killing the thread. Any idea why this is
returning false?
Thanks for your help.
Thank You,
Ben Johnson
E: bjohnson at contuitive.com
-------------- next part --------------
An