Displaying 20 results from an estimated 6000 matches similar to: "beginning_of_month problem"
2009 Apr 07
4
/lib daemon folder: how do i add a module into the daemon?
I am using the daemons plugin.
I have just one problem how do i add modules from the /lib folder to
the /lib/daemons/daemon.rb file
eg. /lib/basic_functions.rb
this is the file i want to load in daemon.rb
contents daemon.rb:
#!/usr/bin/env ruby
# You might want to change this
ENV["RAILS_ENV"] ||= "production"
require File.dirname(__FILE__) +
2009 Mar 25
3
List of databases supported by Rails
Where can I obtain list of databases supported by Ruby on Rails?
Thanks
TheR
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe
2006 Jun 28
8
How to obtain clients IP adress
Is it possible to obtain clients adress in ruby on rails?
by
TheR
--
Posted via http://www.ruby-forum.com/.
2008 Nov 06
4
SQL question
This works as expected in sqlite3
select id, title || body as tb from docs where tb like ''%en%''
But fails in postgres because tb is unknown.
and works in ms-sql like:
select id from docs where title+body like ''%en%''
I didn''t tried Oracle but I guess it has its own sintax too.
So my questions are.
1. Is there universal SQL syntax to support this
2008 Jun 04
2
How to change ActiveRecord date format conversion
I am using custom control for entering a date on the form. My date
format is dd.mm.yyyy and this is also what the control returns to
program. But ActiveRecord expects date to be formated as mm.dd.yyyy and
thus saves wrong value to database.
I have implemented method which corrects date fields prior to save to
database, but it is clumsy. There must be a solution to configure
ActiveRecord so it
2006 Jun 28
9
Scaffold Issue with Postgres
Hi guys,
I''ve been able to successfully install the postgres adapter for a remote
database machine to get rails up. My machine is running on Fedora 2.
Rails version 1.1.2. Is my yml config correct? I am getting this error
when I execute script/generate scaffold service_contents content :
exists app/controllers/
exists app/helpers/
create app/views/spiel
exists
2008 Oct 14
4
replace_html not working
hallo, everyone
can anybody help me? i did add my code under ENGINES as a module in a
project. before the change , all worked . and the differenz between
both is only about application''s environment,
before is
Ruby version 1.8.6 (i486-linux)
RubyGems version 1.1.1
Rails version 2.0.2
Active Record version 2.0.2
Action Pack version 2.0.2
2008 Apr 22
0
rspec model class methods
I''ve started specifying a project and could use some help. I''m not sure
if the spec is entirely necessary, it would be great to get some
guidance on a best practice or something close.
I recently realized the need to add the method below grouped_by_months
and started to write a spec.
idea 1:
{{{
before do
@comment = Comment.new
2008 May 25
2
storing data from a txt file in ruby?
Hello Im trying to write a a ruby program that takes a list of books
title ,author so on and i can read in the file with no problem but im
trying to store the list into either a array or hash so i ca say run
different methods view, delete ect..
anyhelp would be great this is what i have so far
IO.foreach("book_list.txt") do |line|
catalog=line.chomp.split(",")
2006 Jul 28
4
add one month or one year to a date
Hi,
I need to be able to add one month or in some cases on eyear to a Date.
Does anyone know of any easy ways of doing this?
thanks
scott
--
Posted via http://www.ruby-forum.com/.
2010 Nov 05
3
non event_calendar
What am I missing here, trying to get the event_calendar plugin working
with my existing app. Have installed the plugin, which I guess is a good
start, then this...
class Booking < ActiveRecord::Base
has_event_calendar :start_at_field => ''arrival_date'', :end_at_field =>
''departure_date''
Route...
map.availability_calendar
2008 Mar 06
4
Active Record Question
Hi-
Say I am returning some collection of DateTime items and I only want
to compare the month. Is there a way to do this directly in the find?
Something like this...
@coll = Collection.find(:all, :conditions => ["date.month
= ?",Time.now.lat_month])
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
2006 Oct 24
1
Code blocks syntax as method arguments
How do I format this so that it does what I want it to,
Day.find_by_month_and_year(
[Date::today.month + 1 if !Date::today.month == 12 else 1 end],
[Date::today.year if !Date::today.month == 12 else Date::today.year +
1 end]
)
?
WHICH IS
to pass Day.find_by_month_and_year Date:today.month +1 if the month is
not december otherwise pass, 1, and to pass as the second argument
2008 May 03
11
Date comparisons
I occasionally get this error:
1)
''A puzzle once featured, should no longer be nominated'' FAILED
expected: Sun May 04 09:10:26 -0700 2008,
got: Sun May 04 09:10:26 -0700 2008 (using ==)
./spec/models/puzzle_spec.rb:180:
So, the dates looks the same to me. Any ideas for how to debug?
Joe
2005 Nov 08
6
[ANNOUNCE] iproute2 2.6.14-051107
Update to iproute2 is available. Most of the changes were to repair the
things that broke with the introduction of the batch mode to the ip command.
http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.14-051107.tar.gz
For info on CVS ans other info see:
http://linux-net.osdl.org/index.php/Iproute2
Masahide NAKAMURA
* Updating for 2.6.14
- Show UPD{SA,POLICY} message
2004 Nov 10
5
command to list ip route tables
In linux one can have several route tables. But how do I list the
route tables?
(and no ''ip rule list'' is not it)
--
damjan | дамјан
This is my jabber ID --> damjan@bagra.net.mk <-- not my mail address!!!
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
2008 Oct 14
3
domains gets stalled for N seconds
Hi,
we have a software accessing a lot of small files. We installed Xen 3.2 on a server with two quad core Xeons. We installed two
domains with our software on Linux and put it into production.
The problem is that I suspect that domains are not running at full (hardware) speed and they are getting stalled from time to time.
I can see a lot of wait in top and "top -d .5" gets stalled
2004 Aug 09
4
ARP daemon
I''m looking for a program that will replace the automatic ARP table
population by the Linux kernel. The daemon should fix the MAC <-> IP
entry from the IP of the first packet with that MAC received.
Is there anything like this?
--
damjan | дамјан
This is my jabber ID --> damjan@bagra.net.mk <-- not my mail address!!!
_______________________________________________
LARTC
2011 Jun 22
3
[LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs
On Jun 22, 2011, at 7:22 AM, Renato Golin wrote:
> On 22 June 2011 14:33, Damjan Marion <damjan.marion at gmail.com> wrote:
>> Problem is that in case when old binutils are used (in my case freebsd is using old one due to license upgrade to GPLv3) AS doesn't understand new mnemonics and fails.
>
> Indeed, this is new in ARM ARM v7.
>
>
>> Can we change to
2011 Jun 22
3
[LLVMdev] ARM thumb-2 instruction used for non-thumb2 CPUs
On Jun 22, 2011, at 3:16 PM, Renato Golin wrote:
> On 22 June 2011 11:49, Damjan Marion <damjan.marion at gmail.com> wrote:
>> # /opt/llvm/bin/clang -S -ccc-host-triple arm-unknown-freebsd -mcpu=arm926ej-s -mfloat-abi=soft -v -o rrx.S rrx.c
>
> Even though you specified cpu as arm9, it's probably generating
> generic ARM IR (use -emit-llvm -S and see), which defaults