Twitter/Facebook API for Ruby.
I want to write a Ruby application through which: I can submit tweets to twitter. I can submit a post to facebook. I can manage real-time stats of tweets Is there any twitter/facebook api for Ruby? ...
I want to write a Ruby application through which: I can submit tweets to twitter. I can submit a post to facebook. I can manage real-time stats of tweets Is there any twitter/facebook api for Ruby? ...
Hi. I'm (extremely) new to Ruby, having started today. I just moved from my system's Ruby 1.8 installation to Ruby 1.9, compiled from source. In doing so, irb has taken a turn for the worse. It reacts in a most unfriendly way to the non-alphanumeric control keys: UP key prints: ^[[A DOWN key prints: ^[[B DELETE key prints: ^[[3~ ...
Hey there, I currently use TextMate for Ruby/Javascript/Actionscript development and it is amazing. But one thing I would really love to use are breakpoints so I could stop code execution and examine the state of the variables and walk through the code. Something like what Flex Builder does. Does TextMate have this capability? Or wh...
Given a user model something along the lines of: class User < ActiveRecord::Base acts_as_authentic do |config| config.validate_email_field = true end end I would like to be able to modify "true" to be specific to the user that is signing up. I would like to be able to do something like: class User < ActiveRecord::Base ac...
I'm a seasoned web developer but only have a modicum of Ruby/Rails experience. I just got an interview Monday at a Ruby shop, they do realize I don't have much Ruby experience. Besides 2 or 3 Ruby books I have lying around, what other resources might I avail myself of for a weekend crash course in Ruby. I do have a bare minimum accoun...
I'm looking for a way to faux-delete rows from a table using Rails. The rows shouldn't show up in any normal .find() search except for when I want to show recently deleted items. I'm using an Activities table right now for management of such tasks, which stores the class, id and method performed on rows recently. Is there a way to disab...
I am building a chat system using EventMachine and ruby on rails. It's for learning purpose. This is how client is connecting to server. c = TCPSocket.open(ip_address, port) data = {:user_id => 2, :message => 'hello world'} c.send(data) response = c.gets c.close It works. However the problem is that I can't get the list of people who...
Hi. I'm spending today learning Ruby from a Python perspective. One thing I have completely failed to grapple with is an equivalent of decorators. To pare things down I'm trying to replicate a trivial Python decorator: #! /usr/bin/env python import math def document(f): def wrap(x): print "I am going to square", x ...
I am building a financial reporting app with Ruby on Rails. In the app I have monthly financial statement objects (with 'revenue' as an attribute). For any single financial statement, I want show (1) year-to-date revenue, and (2) last-year-to-date revenue (calendar years are fine). Each object also has a Date (not Datetime) attribute c...
In my Rails application, I need to create a symlink between two files inside RAILS_ROOT. The names of target and symlink are given as absolute paths. However, I want to create a symlink that uses relative paths, so the application folder could easily be moved. In other words, from RAILS_ROOT/path/foo/bar and RAILS_ROOT/path/baz I want...
I'm running into an issue with an existing ActiveRecord::Observer model that records various Activities of a User the site. Everything was working really well, until I tried to observe the User class with the same Activity model that it uses to observe other models. Consider that: class Activity < ActiveRecord::Base belongs_to :user b...
Hi, I'm trying to get a page with an ISO-8859-1 encoding clicking on a link, so the code is similar to this: page_result = page.link_with( :text => 'link_text' ).click So far I get the result with a wrong encoding, so I see characters like: 'T�tulo:' instead of 'Título:' I've tried several approaches, including: Stating the enco...
In Rails, fixtures records seem to be inserted & deleted in isolation for a given model. I'd like to test having many objects/rows in one transaction, eg. to check uniqueness. How to do it? ...
What are the various sites that offer metrics that compare Ruby, Python, Perl, Smalltalk etc. What are their respective metrics? Do any of them control or account for the time that Rails was introduced, and/or the adoption rates for various languages? Will someone please help me close this question? Clearly it was not a successful vent...
I've recently have started writing unit tests for PL/SQL code in Ruby. Are there any other language combinations where you write your code and unit tests in two completely different languages? ...
Is there any way, on Ubuntu 9.04, to install ruby 1.8 as ruby1.8 (or get rid of it altogether) and have ruby 1.9 be the default ruby? ...
I have a MySQL table and I want to pick certain columns to create RSS Feed from it. How to do it using Ruby or Rails or Gems? ...
I'm currently playing a bit with couchdb. I'm trying to migrate some blog data from redis (key value store) to couchdb (key value store). Seeing as I probably migrated this data a gazillion times from and to different blogging engines (everybody has got to have a hobby :) ), there seem to be some encoding snafus. I'm using CouchREST to a...
Hello does anyone know of a program that has support for code completion for Sketchup Ruby API. Thanx for answers Ladislav ...
I have no idea if this is a Hash issue or an Array issue, but I don't figure out why asterisk (*) sign is required in the third example to get a hash filled with data. Without it, it outputs an empty hash. # -*- coding: utf-8 -*- require 'pp' pp [[:first_name, 'Shane'], [:last_name, 'Harvie']] # => [[:first_name, "Shane"], [:last_name, ...