Displaying 20 results from an estimated 7000 matches similar to: "Working around the year 2038 bug in Ruby''s Time class?"
2006 May 05
7
vim: space or tab in indenting?
this is semi-off topic but still related to ror.
i had a problem with testing my depot program (which i follow the
tutorial in agile web development book). it took me many hours to solved
the problem. all the while i thought i was using spaces inside the
test/fixtures/products.yml
programmer_book:
id: 1
title: Pragmatic Programmer
description: Best book
2006 Apr 28
2
Rails and Firebird
Hello! I''m new to Ruby and Rails, but have been reading along here, and
searched the archives and didn''t see anything addressing some concerns I
have with using Rails and Firebird.
I prefer Firebird when it is available, and I''m very pleased to see that
others have gotten it working with Ruby. I have been trying to use it
with Rails, with mixed success.
2006 May 05
2
can you do global match regular expressions?
I cant figure out how to do global regular expressions in ruby. Im not
even sure if its possible. In the "Programming Ruby" book there is no
mention of it.
Can you do this?
text = "aaa1 bbb2 ccccc3 dddddd4 eee5"
re = /\w+\d{1}/
matches = re.match text
m[0] = "aaa1"
m[1] = nil
m[2] = nil
and so on....
Is there any way to get an array of all the matches??
2006 Apr 30
3
New to Rails/Ruby how to proceed?
Being a somewhat jaded Java programmer I''ve decided to make an
evaluation of Ruby and Rails. I''ve purchased both the Pragmatic books
(Programming Ruby, Agile Web Development with Rails) and I''d like to
get people''s opinions as to the best way to use them. When you were
learning Rails did you find that you had to read Programming Ruby
first or did you
2006 Apr 27
7
SuperImage plugin
Greetings all,
This is the first release of the SuperImage plugin. The idea is you
upload images to the database, and then pull them out at any size you
want. Combine this with caching and it will stay light and fast.
More info and instructions are here:
http://beautifulpixel.textdriven.com/articles/2006/04/27/superimage-plugin-making-resizeable-uploaded-images-easy
svn:
2006 May 03
6
Scaffold Generation Problem
Greetings all,
I''m sure there is probably a very obvious reason for the following
problem. However, after much hair pulling, I am just not seeing it yet.
As you can see from the trace below, I am not able to complete scaffold
generation due to some problem between rails and mysql. I double
checked MySQL to make sure both my Ruby user and Root user have full
rights to the database.
2006 Jul 17
18
Inserting datetime value into SQL Server
I have a SQL Server column named StartTime of (SQL Server) type datetime
If I attempt to set the attribute using
public
def StartTime=(time)
write_attribute(:StartTime, "{ts ''1899-12-30
#{time.hour}:#{time.min}:#{time.sec}''}")
end
it''s inserting a NULL value.
Anyone else able to successfully insert a date time value into a SQL
Server table using
2009 Jun 18
3
Date.new.to_time.to_i
What''s going on here!?
>> Date.new.to_time.to_i
NoMethodError: undefined method `to_i'' for Mon, 01 Jan -4712 00:00:00
-0800:DateTime
from (irb):25
>> Date.today.to_time.to_i
=> 1245308400
>> RUBY_VERSION
=> "1.8.7"
>> Rails.version
=> "2.1.1"
(I''m not sure if this is a rails thing, or just a ruby thing)
--
2015 May 18
2
[Y2038] kernel/libc uapi changes for y2038
On Monday 18 May 2015 12:16:48 Thorsten Glaser wrote:
> Arnd Bergmann dixit:
>
> >In the patch series I posted recently [1], I introduce new system calls to deal
> >with modified data structures, but left the question open on how these should
> >be best accessed from libc. The patches introduce a new __kernel_time64_t type
>
> Can we please have ioctls fixed for
2006 Jul 25
1
Node Attributes
So I am designing a railsapp that indexes school organizations such as
clubs and frats/sororities. I have decided to represent this as a graph,
and that each entity is going to be just represented as a node, and the
relationship between each node is going to be an edge.
so basically, a frat such as "Alpha Beta Gamma" is represented as a
node, and its chapters also as seperate nodes,
2006 Jul 14
1
error with Dates in SQL Server
An application that run without flaw last week has been reported to
crash with an error that says that a conversion from char to datetime
has given a date outside range.
This very application runs OK today in production (fortunately :-),
and the difference in both SQL Servers is just that the one where the
exception has started to appear has Spanish conventions. I can''t give
2006 Feb 24
5
Sanity Check
Maaaaaaaaaaaaajor sanity check needed.
I wrote a simple little plugin, and it wouldn''t load. I put some comments
in it''s init.rb, and it didn''t even spit those out. So, I dug into the
initializer.rb (/vendor/rails/railties/lib/initializer.rb) to see wtf is
going on, and found the problem... but... can''t explain it. Here is the
code in question:
2006 May 03
1
nil.strip error While trying to post xml data over https.
I am trying to subit some xml data over https to access an API. My code
so far seems to generate a very non-helpful error in the guts of the
net/http library. This code produces a NoMethodError for nil.strip"
require ''net/http''
require ''net/https''
require ''uri''
url =
2006 Feb 08
2
Adding routes via a plugin...
I have a plugin that I am working on that will as part of its distribution
contain a controller. I would like to be able to add a route for it in the
plugin''s init.rb so that when the plugin is loaded, the route will
automatically be registered without having to force the user to edit
routes.rb or even make a rake task to do it for them.
I saw the following code in one of the SVN
2015 May 18
5
kernel/libc uapi changes for y2038
In the patch series I posted recently [1], I introduce new system calls to deal
with modified data structures, but left the question open on how these should
be best accessed from libc. The patches introduce a new __kernel_time64_t type
and based on that five new data structured: struct __kernel_timespec,
struct __kernel_itimerspec, struct __kernel_stat, struct __kernel_rusage,
and struct
2006 Jan 20
4
REST API''s and querying a graph of objects
Hey all,
I am wondering if anyone has given thought to using REST / XPath as
querying mechanism. That way you could have a URL that actually maps
to a collection of records (objects, really) that meet a certain
criteria and that are sorted a certain way.
Mike Pence
2006 May 05
31
The perfect development environment?
I am trying to create the perfect development environment for rails
and i dont know exactly which way to go. Do i create a windows
environment or a *nix environment. If i go *nix, what distro is best
suited for rails. I would be using mysql, so that would come in to
play. If i go *nix, i would use apache. Any ideas for the right
environment would be greatly appreciated. I guess the major choice is
2006 Aug 16
6
error with edge rails
I''ve started an app with rails 1.1.6 then ran freeze_edge. My app
will not run with rails in the vendor folder. Have I forgot to do
something? I"ve been without the internet for the last two months.
Has something changed?
2024 Oct 16
0
regress/key-options.sh: should expire much later than in 2038
Hello,
Testing systems for Y2038 safety is done by setting the clock to after
2038, and then running all available test suites. This however
requires that actual Y2038 issues are not masked by key expiry errors
(when tests hardcode expiry dates), and this is what happens in this
particular test.
I've submitted a fix here:
https://github.com/openssh/openssh-portable/pull/425
and here:
2006 Apr 26
8
script/server lighttpd on Windows
Has anyone been able to get script/server to successfully use lighttpd
on a Windows box? When I try to start the server I get:
PROBLEM: Lighttpd is not available on your system (or not in your path)
So then I add "C:\lighttpd\sbin" to the path for the console session,
and it still fails with the same error.
If anyone has some success with this I sure would like to know. Webrick