Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [ruby]

Ruby is a multi-platform open-source, dynamic object-oriented interpreted language. The [ruby] tag is for questions related to the Ruby language, including its syntax and its libraries. Ruby on Rails questions should be tagged with [ruby-on-rails].

ruby
6 votes
3 answers
1k views

Ruby blocks/Java closures in C

I've been trying to understand how Ruby blocks work, and to do that I've been trying to implement them in C. One easy way to implement closures is to pass a void* to the enclosing stack to the ...
Julio César's user avatar
  • 13.1k
4 votes
2 answers
2k views

JRuby / Rack deployment

I know this is pretty exotic, but I want to deploy a Ruby web application (not Rails, but Rack based, so it plugs into most Ruby servers just fine) using JRuby. Google and friends give me a few ...
wvdschel's user avatar
  • 11.8k
2 votes
2 answers
746 views

How do I access the Ruby AST from C level code?

I understand that the Ruby 1.8 AST is traversed at runtime using a big switch statement, and many things like calling a method in a class or parent module involve the interpreter looking up and down ...
maetl's user avatar
  • 888
23 votes
0 answers
7k views

OpenID authentication in Ruby on Rails [duplicate]

I am a neophyte with Ruby on Rails but I've created a couple of small apps. Anyway, I'm really interested in OpenID and I would like to implement OpenID authentication and maybe some Sreg stuff in a ...
martinatime's user avatar
  • 2,487
6 votes
4 answers
9k views

Why Doesn't My Cron Job Work Properly?

I have a cron job on an Ubuntu Hardy VPS that only half works and I can't work out why. The job is a Ruby script that uses mysqldump to back up a MySQL database used by a Rails application, which is ...
John Topley's user avatar
88 votes
6 answers
55k views

What do the different brackets in Ruby mean?

In Ruby, what's the difference between {} and []? {} seems to be used for both code blocks and hashes. Are [] only for arrays? The documention isn't very clear.
Tilendor's user avatar
  • 48.7k
3 votes
2 answers
551 views

Why does sqlite3-ruby-1.2.2 not work on OS X?

I am running OS X 10.5, Ruby 1.8.6, Rails 2.1, sqlite3-ruby 1.2.2 and I get the following error when trying to rake db:migrate on an app that works find connected to MySQL. rake aborted! ...
go minimal's user avatar
  • 1,703
15 votes
4 answers
12k views

Drawing Library for Ruby

I am trying to code a flowchart generator for a language using Ruby. I wanted to know if there were any libraries that I could use to draw various shapes for the various flowchart elements and write ...
Pascal's user avatar
  • 4,127
35 votes
5 answers
31k views

Ruby mixins and calling super methods

Ok, so I've been refactoring my code in my little Rails app in an effort to remove duplication, and in general make my life easier (as I like an easy life). Part of this refactoring, has been to move ...
Mike's user avatar
  • 3,396
0 votes
2 answers
655 views

How do I write those cool command line code generators (rails, sproutcore, webgen)

I've grokked the code for all the aforementioned apps and I still can't find a straightforward way to create a static directory structure from a single command.
capotej's user avatar
  • 2,967
58 votes
5 answers
32k views

Why doesn't Ruby have a real StringBuffer or StringIO?

I recently read a nice post on using StringIO in Ruby. What the author doesn't mention, though, is that StringIO is just an "I." There's no "O." You can't do this, for example: s = StringIO.new s &...
James A. Rosen's user avatar
21 votes
15 answers
9k views

Learning Ruby on Rails any good for Grails?

My company is in the process of starting down the Grails path. The reason for that is that the current developers are heavy on Java but felt the need for a MVC-style language for some future web ...
levifig's user avatar
  • 510
14 votes
8 answers
1k views

How to sell Python to a client/boss/person [closed]

When asked to create system XYZ and you ask to do it in Python over PHP or Ruby, what are the main features you can mention when they require you to explain it?
Teifion's user avatar
  • 110k
11 votes
3 answers
2k views

How do I create a Class using the Singleton Design Pattern in Ruby?

The singleton pattern is a design pattern that is used to restrict instantiation of a class to one object instance. Although I know how to code the singleton pattern in C++ and Java, I was wondering ...
CodingWithoutComments's user avatar
240 votes
20 answers
269k views

How do I update Ruby Gems from behind a Proxy (ISA-NTLM)

The firewall I'm behind is running Microsoft ISA server in NTLM-only mode. Hash anyone have success getting their Ruby gems to install/update via Ruby SSPI gem or other method? ... or am I just being ...
Brett Veenstra's user avatar

15 30 50 per page