DateBocks 2.0.1 - Bugfix Edition

subimage interactive wrote:

I’m deploying my app with Capistrano. Datebocks works beautifully on my
local machine, but when I send it to the server it looks as if the
engine_files (css/js) aren’t even being copied over into the public
directory.

Have you run into this before? Any ideas what’s going on?

I have a similar issue… Datebocks works beautifully when running the
application via Webrick, but when I deploy it in an Apache/CGI
environment, it gives me the following error message:

undefined method `datebocks_field’ for #<#Class:0xb7848f6c:0xb7848f44>

(FYI: I posted this issue on this thread about a week ago) … I’m not
sure this is the same issue as yours, but it definitely appears that
the two problems might be related. Hopefully the following might be of
use to you:

I haven’t been able to resolve this issue yet, but I have been able to
verify that it is most likely not a permissions issue: by logging
“Engines.start.inspect” I can actually verify that both
“vendor/plugins/engines” and “vendor/plugins/datebocks_engine” are
loaded (and from the correct location) in the webrick as well as in the
apache/CGI setup.

However, in the Apache/CGI setup, it appears that the Datebocks engine
stuff isn’t correctly “included” in the ApplicationHelper module (and
hence not correctly mixed into the templates) which at least explains
the above error message…

Using “ApplicationHelper.method_defined? :datebocks_field” before and
after starting the engines, I seem to be able to confirm that somehow
the Datebocks stuff doesn’t get included: in my WebRICK environment, I
get “false”/“true”, but in my Apache/CGI environment I get
“false”/“false”… things that make you go hmmmmmmmmmm

But why it doesn’t get included is still a mystery… the investigation
continues. Anyway, maybe the above is useful info for you to get to
the bottom of your problem. FYI,

PV

Hey PV,

I am curious whether or not DateBocks itself is being loaded on
Apache/CGI?

Can you verify in your log/production or development logs that it is
indeed being started correctly?

Next question I would ask is whether or not the code on the Apache
server is the same. If you have the Engines.start :datebocks code
within your environment.rb, and both the engines plugin and
datebocks_engine plugin are sitting comfortably in the vendor/plugins
directory, it would lead me to assume that Apache has not yet been
restarted. Or may need to have a hard stop/start to kick DateBocks
into the loaded CGI cycle.

-NSHB

On 9/1/06, [email protected] [email protected]
wrote:

application via Webrick, but when I deploy it in an Apache/CGI
verify that it is most likely not a permissions issue: by logging
Using “ApplicationHelper.method_defined? :datebocks_field” before and


Nathaniel Steven Henry Brown

Open Source Insight - http://nshb.net
Open Source Development - http://inimit.com
Open Source Training - http://osevents.com

I’d like to echo this question. I really like using DateBocks, and have
implemented in our organization’s website. Several co-workers, however,
would like to see the default date format as MM - DD - YY. Is there any
way
to do this?

Thanks,
Chris

Hey Chris,

I am to suppose you mean at GWU?

To you question, currently there are there options for the different
formats

US = MM/DD/YYYY
ISO = YYYY/MM/DD
DE = MM.DD.YYYY

You can configure any one of these in the engine itself, by modifying
the datebocks_engine.js file. I haven’t yet implemented a way to
override the setting on a per instance level quite yet, but just
created a ticket to put some energy into this when I get a moment.

http://dev.toolbocks.com/tickets/34

-NSHB

On 9/2/06, Chris S. [email protected] wrote:

within your environment.rb, and both the engines plugin and

I’m deploying my app with Capistrano. Datebocks works beautifully on my
undefined method `datebocks_field’ for
“vendor/plugins/engines” and
:datebocks_field" before and

Open Source Training - http://osevents.com


Nathaniel Steven Henry Brown

Open Source Insight - http://nshb.net
Open Source Development - http://inimit.com
Open Source Training - http://osevents.com

On 02 Sep 2006, at 16:29, Nathaniel B. wrote:

DE = MM.DD.YYYY

You can configure any one of these in the engine itself, by modifying
the datebocks_engine.js file. I haven’t yet implemented a way to
override the setting on a per instance level quite yet, but just
created a ticket to put some energy into this when I get a moment.

http://dev.toolbocks.com/tickets/34

It’s going to get messy anyway. Over here in Belgium, we use two
formats: DD-MM-YYYY or DD/MM/YYYY.

Best regards

Peter De Berdt

Hi Nathaniel,

I’m running into the same issue here, has any light been shed on the
mistery?
datebocks works great on my local machine, but I get this undefined
method datebocks_field error on dreamhost, though I’ve killed and
started new fcgi processes several times. I’ve triple checked
everything mentioned on this thread: I have both the engines and the
datebocks_engine installed correctly, my environment config has
Engines.start :datebocks, and both ApplicationController and
ApplicationHelper include datebocks.

on my local machine I’m using Locomotive 2 (mongrel), and on
production I have the standard apache/lighttpd/fcgi setup, with Rails
1.1.6

one thing I noticed on development was that sometimes I would get this
same error when running the page using datebocks for the first time
after starting the server, but from the first refresh on it would work
fine. could this be related?

many thanks, by the way… datebocks is just what I needed after
struggling with the rails date helpers!

  • Oliver

2006/9/1, Nathaniel B. [email protected]:

anyone? sorry to be a pain, but this is a bit of a showstopper right
now on a project I’m working on

2006/11/9, Oliver B. [email protected]:

Hey Peter,

Just for you, I did an unexpected release of DateBocks to v2.0.3

You can upgrade, and will find that there is now the functionality you
requested for the new date formats.

To override them, simply add this block of code above the JS include
tags for DateBocks.

Enjoy!

-NSHB

On 9/2/06, Peter De Berdt [email protected] wrote:

To you question, currently there are there options for the different formats
http://dev.toolbocks.com/tickets/34

Peter De Berdt


Nathaniel Steven Henry Brown

Open Source Insight - http://nshb.net
Open Source Development - http://inimit.com
Open Source Training - http://osevents.com