Stoppt die Vorratsdatenspeicherung! Jetzt klicken &handeln! Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:

Archived entries for ruby

Ruby on Rails Gotchas

BetterExplained erklärt einige gotchas mit Ruby on Rails.

Der Code von Ruby Skripten wird schon etwas klarer wenn man weiß:

  • Parenthesis on method calls are optional; use print “hi”.
  • Semicolons aren’t needed after each line (crazy, I know).
  • Use “if then else end” rather than braces.
  • Parens aren’t needed around the conditions in if-then statements.
  • Methods automatically return the last line (call return explicitly if needed)

Ruby One-Click Installer

Ein One-Click Installer für Ruby 1.8.6. Wer sich also nicht mit dem Terminal heraum schlagen will findet hier eine Alternative.

Installiert wird:

  • Ruby 1.8.6
  • SQLite 3.4.0
  • Mongrel 1.0.1 (+dependencies)
  • Ruby/LDAP 0.9.7
  • Ragel State Machine Compiler 5.22
  • Rubygems 0.9.4
  • Gem: sqlite3-ruby (1.2.1)
  • Gem: daemons (1.0.6)
  • Gem: rake (0.7.3)

Tools: CSS Redundancy Checker

Interessantes Project bei Google Code: CSS Redundancy Checker

A simple script that, given a CSS stylesheet and either a .txt file listing URLs of HTML files, or a directory of HTML files, will iterate over them all and list the CSS statements in the stylesheet which are never called in the HTML.

Basically, it helps you keep your CSS files relevant and compact. And it’s reasonably accurate.

Mehr Infos findet man bei Infovore.

Um den CSS Redundancy Checker unter OS X 10.4.x zu laufen zu bekommen muss man allerdings noch ein wenig tun, da OS X mit der ruby Version 1.8.2 daher kommt und 1.8.5 erwartet wird. Eine Schritt für Schritt Anleitung für die Installation der neuesten ruby Version gibt es hier.

X/HTML to pdf

Der Artikel HTML / CSS to PDF using Ruby on Rails im subLog hat mich auf Prince xml aufmerksam gemacht.

Prince is a computer program that converts XML and HTML into PDF documents. Prince can read many XML formats, including XHTML and SVG. Prince formats documents according to style sheets written in CSS.

Schnittstellen/Module existieren unter anderem für Java, ActiveX/COM, ASP, PHP und ColdFusion.

The demonstration version of Prince is fully functional, but adds an annotation to the corner of the first page of generated PDF files. This version can be used free for non-commercial use.

Ansonsten fangen die Gebühren bei 495$ Dollar an.

OpenBook: Programmierung in Ruby

Lesestoff: Programmierung in Ruby - Der Leitfaden der Pragmatischen Programmierer



Copyright © 2004–2009. All rights reserved. – Impressum

RSS Feed. This blog is proudly powered by Wordpress and uses Modern Clix, a theme by Rodrigo Galindez.