26 Recent Entries tagged with »Ruby«
URITemplate is a parser for URI Templates as defined in the URI Template specification (http://bitworking.org/projects/URI-Templates).
I just couldn't resist. The by now well known Netflix Prize is a great opportunity to do a little bit research about recommendation engines (recommender).
I decided to use a plain MySQL 5 d...
Are you getting the following error while trying to use the "gem" command?
undefined method `refresh' for #<Hash...
Solution: Delete your source_cache files!
These files are located...
As of today attachr.com now supports the following additional languages:
Clipper
Rexx
Oberon
FORTRAN 77/Fortran 90/95
Lisp and
Pike
Examples: Rexx, Oberon an...
I was asked how to get the body of an HTTP post request in a Rails controller. And with the most things in Rails it's very easy.
...
The day before yesterday i wrote a short post about RubyOSA. RubyOSA is a Ruby/AppleEvent Bridge which in the end means that you can use Ruby to script Mac OS X applications like iTunes, iChat, A...
As mentioned here Ruby trunk now contains YARV. YARV is a Virtual Machin for Ruby and Ruby trunk is what will become Ruby 1.9.1 (it is 1.9.0 as of now).
The benchmark looks really promising...
Is there a pure-ruby ordered hash? I'm looking for something that will
preserve the order in which key/value pairs were entered.
Although one might argue that a Hash that preserves inserti...
Get http://rubyosa.rubyforge.org/ if you are programming Ruby on Mac OS X!
RubyOSA is a bridge that connects Ruby to the Apple Event Manager infrastructure. In other words, it allows you to...
Installing the native MySQL-Driver for Ruby on my MacBook Pro (Mac OS X 10.4.8) resulted in the following error after running
sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql.
...
Soon to be announced on ruby-lang.org: Ruby 1.8.5 is out.
You can get it here: ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.5.tar.gz.
Read the release note on ruby-talk mailing list.
...
Ruby has different libraries that provide higher-level access to network protocols such as FTP, HTTP or HTTPS. This article shows the usage of net::http, net::https, open-uri and the rio library...
Using the most recent version of Rails the rdoc rake task fails on my windows test box.
A quick and simple hack enables the rdoc task.
Replace:
Rake::RDocTask.new("appdoc") { ...
How to search for a specific gem.
Go get http://www.kleptones.com/pages/downloads_24h.html!
Due to the lack of working torrent files i wrote a nifty little ruby script to fetch all the mp3 files (works on OSX and RedHat, your mileage may vary).
Just type "ruby download_kleptones.rb" and all the mp3 files are being downloaded into a "Kleptones_24hours" directory.
See
the kleptones blog for more information.
The "-c" or "--charset" option specifies the character set for the HTML output.
Logger:
# == Synopsis
#
# Simple remote debug class
#
# == Author
# Stefan Saasen s@juretta.com
#
# == Copyright
# Copyright (c) 2005 juretta.com Stefan Saasen
# Licensed under the same...
require 'net/http'
req = Net::HTTP.get_response(URI.parse('http://www.juretta.com/'))
print req.body
require 'open-uri'
open("http://www.juretta.com/") {|f|
print f.read
}
...
Problems installing the Ruby mysql gem?
[sts@powerbook mysql-2.7]$ sudo gem install mysql
[...]
ERROR: Failed to build gem native extension.
[sts@powerbook mysql-2.7]$ cd /usr/local/li...
If you don't want to name your asset directories for javascript files and stylesheets "javascripts" and "stylesheets" here is how you can change the default path settings.
Firefox + Greasemonkey + 72.9.109.166 hoodwink.d...
Go figure!
@hash.iconv!("iso-8859-1", "utf-8")
require 'iconv'
class Hash
def iconv!(to,from)
iconv = Iconv.new(to,from)
perform_iconv!(iconv)
iconv.clos...
The following command will install all packages and libraries with "ruby1.8" in the package name, which should lead to a more or less complete installation of ruby on your machine:
apt-...
ruby -v
[powermac:~] sts% ruby -v
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]
Readline installieren
curl ftp://ftp.gnu.org/gnu/readline/readline-5.0.tar.gz | tar xfz
cd readline-5.0
....
Using Apache as a proxy to serve a Rails on lighttpd application
<Virtualhost xxx.xxx.xxx.xxx>
ServerAdmin s@example.com
ServerName rails.juretta.net
Serv...