Archiv der Kategorie ‘Ruby‘

Rails 2.3.5 - Add routes to your app - Really useful for rails engines and plugins

Tuesday, den 4. May 2010

Since Rails 2.3.5 you can easily load new routes to your app anytime. So using
RouteSet#add_configuration_file
to load a separate route file can me extremly useful when creating a rails plugin or engine that needs to define some extra routes.

Rails 3 - Beta - no such file to load — rails/cli (LoadError)

Tuesday, den 27. April 2010

When trying to create a rails project you might encounter the following error:
/Users/jfischer/.rvm/gems/ruby-1.9.1-p378/gems/rails-3.0.0.beta3/bin/rails:1:in `require’: no such file to load — rails/cli (LoadError)
from /Users/jfischer/.rvm/gems/ruby-1.9.1-p378/gems/rails-3.0.0.beta3/bin/rails:1:in `<top (required)>’
from /Users/jfischer/.rvm/gems/ruby-1.9.1-p378/bin/rails:19:in `load’
from /Users/jfischer/.rvm/gems/ruby-1.9.1-p378/bin/rails:19:in `<main>’
The problem can be solved by uninstalling all prior rails and active* beta versions using the gem command:

gem uninstall railties actionpack actionmailer activemodel activeresource activerecord activesupport
Then reinstall […]

Rails3 - Beta - No such file or directory - lib

Tuesday, den 27. April 2010

If you encounter an error like the following when trying to install rails 3 prerelease:

ravel:~ jfischer$ gem install rails –prerelease

Successfully installed rails-3.0.0.beta3

1 gem installed

Installing ri documentation for rails-3.0.0.beta3…

ERROR:  While executing gem … (Errno::ENOENT)

No such file or directory - lib
then you might want to try skipping the ri and rdoc generation which worked for me:

ravel:~ jfischer$ […]

Scottish Ruby Conference 2010 sum up

Thursday, den 8. April 2010

Really impressed by the beauty of scottish architecture I was wondering how the Scottish Ruby Conference will be like.It has been held at the Royal College of Physicians in Edinburgh a really impressive location. With a history of more than 300 (!) years it is an organization contrasting the the baby aged computer science fraction.
The contrast of talks delivering […]

Accessing the Java Printing API using JRuby

Monday, den 5. April 2010

If you ever have to print a document from a Ruby app you might want to consider using JRuby to access the Java Printing API.Here is a small example accessing the API, looking up the printers and printing out their names to the console:

require ‘java’
flavor = javax.print.DocFlavor::INPUT_STREAM::TEXT_PLAIN_HOST

aset = javax.print.attribute.HashPrintRequestAttributeSet.new
aset.add(javax.print.attribute.standard.MediaSizeName::ISO_A4)
aset.add(javax.print.attribute.standard.Copies.new(1))

services = javax.print.PrintServiceLookup.lookupPrintServices(flavor, aset);

puts(”Anzahl der Drucker: ” + […]

Video of the talk about Evolutionary Programming with Ruby

Friday, den 25. December 2009

The video of my Talk about Evolutionary Programming with Ruby at the Ruby en Rails Conference 2009 in Amsterdam ist now online.

ReR09 - Julian Fisher - Evolutionary Algorithms from Interbureau Holder on Vimeo.

RuPy 2009 - Ruby/Python conference in Poznan Poland sum up

Friday, den 20. November 2009

The RuPy conference 2009 was really a great event. I was totally excited how a polish technology conference will look like and I was impressed how the organiziers cared about everything. Among others Jakub P. Nowak, Katarzyna Bylec and Adam Parchimowicz helped with any open questions. They organized a hotel room as well as the […]

Ruby en Rails 2009 Conference in Amsterdam

Tuesday, den 3. November 2009

This year’s Ruby en Rails conference in Amsterdam was a great success. A lot of great speakers came together with an amazing audience.
Besides the two Rails talks from Jeremy Kemper and  Yehuda Katz there were a lot of really interesting talks.
Jonathan Weiss’ Talk about Rails Security, for instance, was very interesting and should be a […]

RTeX::Document::GenerationError with Phusion Passenger

Thursday, den 17. September 2009

In a recent project I experienced a RTeX::Document::GenerationError only when using Phusion Passenger. After a closer look I’ve seen that the PDF has been successfully created but the redirect to the following request failed. Everything works fine with mongrel.
However, the error messaged looked like the following:
RTeX::Document::GenerationError in BillsController#index</h3> […]

Free Ruby - Email2sms - E-Mail to SMS Gateway

Saturday, den 29. August 2009

Email2sms has been developed by www.avarteq.de.
Email2sms is a free and pure Ruby E-Mail to sms gateway including an extensible filterchain to filter and manipulate incoming emails before sending them as text messages.
Requirements
In order to run Email2sms you will need the following.

IMAP Mailbox
DeveloperGarden Account with credits. Have a look at developergarden.com

Required gems

developergarden_sdk
tmail

Installation
If it is the first […]