Hi,
I have a rubyCocoa project, that was written for ruby 1.8.6, RubyCocoa version 0.13.2. The class tree is built from a xcdatamodel. I'm trying to migrate it to Snow Leopard. When trying to run, the program enters the endless loop, because it fails on method/property lookup. Seems, it has a problem to initialize a data model. It worke...
I have been debugging following class in Ruby over and over again trying to figure out what breaks it. I am out of ideas atm.
Funny enough this is a programming assignment for the course software testing at the university. We are to write a ruby program and determine some properties of a triangle. Note: not asking you guys to solve my ...
Is there a good way in ruby to remove duplicates in enumerable lists (i.e. reject, etc.)
...
Now that http://github.com/why/hpricot/wikis/home no longer exists.
...
I'm using HAML to generate some static html pages for a site, and I was wanting to split out common components into partials that I can include in multiple pages, just like in Rails. However I don't want to use the whole Rails stack to do this as it seems like overkill.
I've looked around on the Internet but haven't found anything, bett...
What do they mean? Why sometimes I should use block and other times &block inside functions that accept blocks?
...
Hay Guys, whats the best books to learn ruby (and ruby on rails)?
Any books you guys would recommend?
Thanks
...
I have to go through the following text and match each of the following, and break them apart into separate records to save to a database. So this text:
ESTIMATED MINIMUM CENTRAL PRESSURE 951 MB
EYE DIAMETER 12 NM
MAX SUSTAINED WINDS 105 KT WITH GUSTS TO 130 KT
64 KT....... 25NE 25SE 25SW 25NW
50 KT....... 60NE 30SE 30SW 60NW
34...
Javascript's getTime() method returns the number of milliseconds since midnight of January 1, 1970.
How do I convert the output of getTime() to a Ruby Time object?
...
I am using Ruby and Tmail to retrieve a series of emails from the server.
Is there any way to determine the hostname of the server that relayed the email message?
...
I want to make a window manager in either of these languages (Preferably ruby). I honestly have no idea where to start except that I will need some kind of X module to load. So if anyone has a clue it would be great if you could point me in the right direction. Thanks
...
My created_at timestamps are stored in UTC:
>> Annotation.last.created_at
=> Sat, 29 Aug 2009 23:30:09 UTC +00:00
How do I convert one of them to 'Eastern Time (US & Canada)' (taking into account daylight savings)? Something like:
Annotation.last.created_at.in_eastern_time
...
I have this algorithm in Java to store passwords in database. I'd like to re-write my application in Ruby on Rails, so I need the same algorithm to compare hashed passwords. What's the Ruby equivalent of this algorithm?
public static String encrypt(String password) {
MessageDigest md;
try {
md = MessageDigest.getInstance("SHA");
m...
I have an ActiveRecord model whose fields mostly come from the database. There are additional attributes, which come from a nested serialised blob of stuff. This has been done so that I can use these attributes from forms without having to jump through hoops (or so I thought in the beginning, anyway) while allowing forwards and backwar...
Hi there,
I'm stuck: I need to create an external link using Rdoc which opens in a new window.
What I have and what opens up in the current window is this:
... to be found here[link:../../bla_bla_bla/index.html] ...
How do I make it open in a new window? Any idea?
Thanks
Matt
...
I tried to make a script that would execute several external binaries to perform some tasks. Each binary was executed from a different thread, but the thing is, it didn't work ( because of the implementation of Ruby's threads in 1.8.6 ).
Is there a different way I could do this, or do I have to go with Ruby 1.9 ?
...
In this example from The Ruby Programming Language (p.270), I'm confused why the instance_eval method on the last line of the sample code defines a class method called String.empty.
Don't you use class_eval to define a class method and instance_eval when you want to define an instance method?
o.instance_eval("@x") # Return the value o...
I'm learning Ruby right now and I got stuck, maybe you guys can help me a bit.
I want to build a small app based on Sinatra that increments a value and prints it on different requests. You go to the root page and you get 1, if you refresh the page you get 2 and so on.
I have no ideea how to get the increment to happen only on refresh
...
Hay, not sure if i've missed the point of the helpers in rails, but i used the date() helper and now i don't know how to access the variables returned.
Heres the helper code
<%=date_select("game", "release_date", :order => [:day, :month, :year])%>
How do i access the returned variables in a controller?
Thanks
...
I see there is a :user_ssl option in attachment_fu which checks the amazon_s3.yml file in order to serve files via https://
In the s3_backend.rb you have this method:
def self.protocol
@protocol ||= s3_config[:use_ssl] ? 'https://' : 'http://'
end
But this then makes it serve ALL s3 attachments with SSL. I'd like to mak...