Spain.rb


Mission

To break the language barrier and help promote the work of Spain-based Ruby(±Rails) developers by spreading the word about projects, gems, plugins, articles or other material created by its members, in the hope that they may find usefulness outside of the Spanish community.


blog posts

Una nueva manera de ver los logs con Clarity published 5 days ago by Emili Parreño


Una nueva manera de ver los logs con Clarity published 5 days ago by Emili Parreño


Planetoid 0.1.6 released published 19 days ago by Jaime Iniesta


Bye, bye Wordpress published 24 days ago by Emili Parreño


Bye, bye Wordpress published 24 days ago by Emili Parreño


IE cache for Ajax requests published 25 days ago by Javier Ramírez

A few days ago I ran into an issue that is now obvious but took me a while to figure out. I was programming a chat client and everything was working fine in Firefox and Chrome, but when I tested it on IE (6 and 8) things were not looking so good.
This chat is following [...]

continue reading >>


Lessons Learned Playing With SSL published 28 days ago by Jaime Iniesta


Blogging from TextMate published 29 days ago by Jaime Iniesta


Adding other tools support in Hudson's rubyMetrics plugin published about 1 month ago by David Calavera


Eclipse buttons not working on Ubuntu Karmic Koala published about 1 month ago by Javier Ramírez

Lately I was experiencing a strange behavior when working with Eclipse/RadRails. Some of the buttons didn’t work anymore. I could click on them, but they’d just appear as selected, without performing any actions. I had to use the enter key to actually click on the button.
Since I had run an update some days ago, I [...]

continue reading >>


Loading several Rails applications into a single Tomcat container with Trinidad published 2 months ago by David Calavera


git bisect published 3 months ago by Sergio Gil


The Atom Exerciser on Heroku published 3 months ago by David Calavera


Conferencia Rails 2009 published 3 months ago by Fernando Blat


Charla sobre GIT el 4 de noviembre en Leganés published 3 months ago by Sergio Gil


Pasting code into vi published 4 months ago by Javier Ramírez

Every time I try to paste a big chunk of code into vi, it gets all messed up because of the autoindent. Each line gets indented taking the previous one as a reference, so when I try to paste something like..

global $wp_query;
parse_str($args, $r);
if (!isset($r['current'])) [...]

continue reading >>


DRYing a little bit the translation of your views with I18n published 4 months ago by Fernando Blat


Character string processing for computer programmers published 4 months ago by Emili Parreño


Character string processing for computer programmers published 4 months ago by Emili Parreño


Character string processing for computer programmers published 4 months ago by Emili Parreño

After my talk in Conferencia Rails 2008, Balint Erdi sent me an email with a very interesting link about character string processing for computer programmers that I forgot to publish and I’ve just found it casually. Is the first of a three-part essay, titled Characters vs. Bytes

continue reading >>


Ruby on Rails on unofficial Chrome OS published 4 months ago by Javier Ramírez

update: I thought this Chrome OS distribution was THE google distro. I was wrong. It’s just someone who used SUSE Studio to make a customized version of Open SUSE around the Chromium theme. With the site being on a google site and the code on a google code repository, I thought this was it, but [...]

continue reading >>


Ruby on Rails in Google Chrome OS published 4 months ago by Javier Ramírez

Chrome OS is by now just a bit more than a curiosity. You can go and download it, but be warned, all you are going to get is an Open Suse distribution with Chromium installed and a blue theme with a cute logo.
Starting the virtual from VirtualBox is easy. You create a new virtual media [...]

continue reading >>


Multiple rubygems versions, GEM_HOME and GEM_PATH published 4 months ago by Javier Ramírez

Installing rubygems is failrly easy and it’s great to have a package manager so you can forget about manually installing and upgrading the components you use. After installing a gem, you can require it from any ruby script and use it hassle-free. Well, given your ruby interpreter can find it.
When you install rubygems, a lot [...]

continue reading >>


Conferencia Rails 2009, just around the corner published 4 months ago by Fernando Guillén

 
Another year, another conference, the conference that opened my eyes to the amazing word of Ruby, there on 2007, is just tuning the last details.
Conferencia Rails 2009, this year bigger, more impressive, with new venue, bigger organization team, more energy, and asking to the english spoken community  to meet us with talks.
This year I am [...]

continue reading >>


EuRuKo 2009 videos are now available! published 4 months ago by Emili Parreño

You can already see the EuRuKo 2009 videos on blip.tv
http://euruko.blip.tv/

continue reading >>


EuRuKo 2009 videos are now available! published 4 months ago by Emili Parreño


EuRuKo 2009 videos are now available! published 4 months ago by Emili Parreño


Improving JRuby 1.9 compatibility published 4 months ago by David Calavera


Request log analyzer published 4 months ago by Fernando Blat


Coding on New York City published 4 months ago by Fernando Guillén

It’s done, I’ll be traveling with my angel to New York City next October. It won’t be a very short visit: 3 months. All the Autumn on New York.
I’m very excited, very stressed and very nervous, I know not one of this sensations is a pleasure sensation, but this is my way, I am a [...]

continue reading >>


Conferencia Rails 2009 – Call for papers published 5 months ago by Jaime Iniesta

So, summer is almost gone and it’s time to start again with the organization of Conferencia Rails – the biggest rails conf held in Spain.
We’ve been organizing this event every year since 2006, and it’s growing and just getting better year after year. This time we want to open our invitations to the English-speaking communities, [...]

continue reading >>


Conferencia Rails 2009, call for papers published 5 months ago by Fernando Blat


Conferencia Rails 2009 - Call for papers published 5 months ago by Jaime Iniesta


Trivial friendly URL system for Ruby on Rails published 5 months ago by Álvaro Bautista

Back to the times I was programming in PHP (it hasn’t been that long but it feels like an eternity has passed), I worked in a company own made CMS. One of my biggest headaches was tuning and reimplementing the friendly URL generator.
Having the need to implement friendly URLs for a little and very specific [...]

continue reading >>


The Rails Rumble Experience published 5 months ago by Fernando Guillén

The software development is a box of wonderful surprises and the community I have found around Ruby on Rails is the most passionate I have never meet.
The last crazy geek stuff I have been involved has been the RailsRumble. The RailsRumble is a conquest where small web development teams has to show what they are [...]

continue reading >>


Video of my talk “Jruby On Rails” at the Sun Open Communities Forum published 5 months ago by Javier Ramírez

I just knew the video of my talk about JRuby on Rails at the Sun Open communities Forum is already online. Funny how a google alert let me know this video has been published even before the official web page of the event was updated.
The talk is in Spanish and the slides I used [...]

continue reading >>


They don't understand published 5 months ago by Sergio Gil


Using Facebooker with jQuery published 5 months ago by Emili Parreño

Facebooker is a great plugin/gem for Rails which allows to connect Feacebook, use your API and build applications, but…. only works with Prototype.
Don’t worry, you can use Facebooker with jQuery easily. Find this code line in your layout
<%= init_fb_connect('XFBML') %>
and replace with
<%= init_fb_connect('XFBML', :js => :jquery) %>
And that’s all! Now Faceboo...

continue reading >>


Using Facebooker with jQuery published 6 months ago by Emili Parreño


Using Facebooker with jQuery published 6 months ago by Emili Parreño


OneOfZombies a brutal stupid 2D game published 6 months ago by Fernando Guillén

OneOfZombies is an experiment proyect.
Don’t come here looking for game development knowledge or very pretty Ruby code design. This is just me playing with Ruby and with Gosu.
After a few weeks working and studding on my free time I can show you this brutal stupid 2D game.

This is not a quality project, this is not [...]

continue reading >>


Do You Believe In Magic? published 6 months ago by Sergio Gil


How to use in_place_editor in Rails 2.x published 6 months ago by Emili Parreño

Install the plugin
./script/plugin install git://github.com/rails/in_place_editing.git
We supose that we have a “State” model with a “name” attribute and we want to edit it “in place”. Add in your controller

class StatesController < ApplicationController
in_place_edit_for :state, :name
end

This method adds an action called “set_state_name” which updates t...

continue reading >>


How to use in_place_editor in Rails 2.x published 6 months ago by Emili Parreño


How to use in_place_editor in Rails 2.x published 6 months ago by Emili Parreño


It's not the framework, it's you published 6 months ago by Sergio Gil


it’s not the framework, it’s you published 6 months ago by Javier Ramírez

I’m getting tired already of the hype about Ruby on Rails and how it is better than any other framework past, present or future.
Sure Rails is a cute piece of software, and Ruby is a gorgeous language (supposing you are into programming languages, that is), but if you take a critical look at Rails, you [...]

continue reading >>


Rails load balancing with Apache and Trinidad published 6 months ago by David Calavera


Jeweler vs rubyforge published 6 months ago by David Calavera


jQuery: deleting the last word from textarea’s cursor published 7 months ago by Fernando Guillén

Following with the completor suggestor I was playing, I had the need to delete the last word from cursor before the completor writes the suggestion selected.
Thanks to the previous function textarea.lastWord() it was  very easy:

jQuery.fn.deleteLastWord = function() {
this.each(function(){
if (this.selectionStart || this.selectionStart == '0'&#...

continue reading >>


jQuery: returning the last word from textarea’s cursor published 7 months ago by Fernando Guillén

I was enjoying trying to develop a kind of completor suggestor on a textarea, I wanted it to jump when the tab key was pressed, that what easy with capturing the keydown event and the help of event.preventDefault.
But the thing what wasn’t such easy was the capturing the last word on the textarea from the [...]

continue reading >>


Tomcat-rails is now called Trinidad published 7 months ago by David Calavera


it’s the end of the e-world as we know it published 7 months ago by Javier Ramírez

Five years
I’ve been working for companies that didn’t last for so long. I’ve never been working in a company for so long come to think of it ;). I’ve had best friends that didn’t last for so long either and I’ve seen plenty of marriages finishing much earlier than that.
Living on the world we live, [...]

continue reading >>


sudo: rake: command not found published 7 months ago by Javier Ramírez

I hate it when it happens, don’t you?
And it’s not only rake, but some other utilities too.
Bottom line is, in Ubuntu sudo is by default set to use a secure path. You can change the secure path if you are compiling from source, but we are talking Ubuntu here, the windows for the rest of [...]

continue reading >>


No SQL published 7 months ago by Fernando Blat


Fixing fieldWithErrors behavior published 7 months ago by Emili Parreño

Dealing with errors in Rails forms can be a hard task. When a form field has errors, ActionView wraps the input in a div of class “fieldWithErrors”. The result is something like this

<p><div class="fieldWithErrors"><input id="user_name" name="user[name]" type="text" value="" /></div></p>

A div inside a paragraph ?¿?¿? This behavoir can be very annoying and isn&...

continue reading >>


Fixing fieldWithErrors behavior published 7 months ago by Emili Parreño


Fixing fieldWithErrors behavior published 7 months ago by Emili Parreño


Show me where am I published 7 months ago by Fernando Guillén

puts lambda {}

continue reading >>


Show me what is inside you published 7 months ago by Fernando Guillén

puts class << self; self; end

continue reading >>


Modeling entity relationships in a non-relational scenario published 7 months ago by Fernando Blat


More planetoids! published 7 months ago by Jaime Iniesta

I’m proud to see that more people are forking and using my little planetoid, a rails application for building small communities online, with feed aggregation. I started building this feed aggregator as we needed a planet for our Spain.rb association of Spanish rubyists, but I wanted to keep in mind that if this was helpful [...]

continue reading >>


More planetoids! published 7 months ago by Jaime Iniesta


Configurar internet móvil Simyo en el macbook published 7 months ago by Jaime Iniesta

Hace un par de días contraté el servicio de internet móvil por modem 3G (GPRS) de Simyo, la tarifa de 5G al mes que viene con un módem Alcatel HSPA, para poder trabajar este verano desde la playa. En principio se supone que es un módem USB plug-and-play, pero en la práctica tuve algún problemilla [...]

continue reading >>


Configurar internet móvil Simyo en el macbook published 7 months ago by Jaime Iniesta


My slides for “Jruby on Rails: Ruby on Rails sobre la JVM” published 7 months ago by Javier Ramírez

It was interesting to be at the Sun Open Communities Forum and meet people I used to work with (or even teach to) as back in time as in 1996.
It was also interesting to have the opportunity to introduce Ruby and Ruby on Rails to Java developers and show them how they could use [...]

continue reading >>


Tomcat-rails, develop rails app within tomcat published 7 months ago by David Calavera


Forcing I18n locale in a block published 8 months ago by Fernando Blat


Tomcat-rails, develop rails app within tomcat published 8 months ago by David Calavera


Speaking about JRuby on Rails at the Sun Open Communities Forum published 8 months ago by Javier Ramírez

I’ve been invited to speak about JRuby on Rails at the Sun Open Communities Forum. This event is the evolution of the former editions of OpenJavaDay/OpenSolarisDay, revamped to include more Open Source communities.
Apart from the predictable “all-things-java” sessions, this year there are some interesting labs and talks about MySQL Scalability, REST, AJAX, the cloud, [...]

continue reading >>


Ruby: Handling fixed string lengths and UTF-8 published 8 months ago by Sam Lown

Until Ruby 1.9 is supported by your favorite plugins and gems, proper UTF-8 support in your ruby code is a serious challenge. If, like me, you don’t have time to wait, the following really simple code snippet should help you to at least fix the sprintf problem of fixing the lengths of strings with unicode characters.

# UTF-8 safe operations for setting a string width
# Aligns to lef...

continue reading >>


install nokogiri and libxml on ubuntu published 8 months ago by Javier Ramírez

a quick one..
the scenario:
you want to install nokogiri on ubuntu but you cannot get the gem to install because of unmet dependencies
the solution:
sudo apt-get install libxml2 libxml2-dev libxslt1-dev
sudo gem install nokogiri
the end

continue reading >>


Define index lengths in your migrations published 8 months ago by Emili Parreño

Defining an index length is a common practice in order to avoid large data indexes, and improve performance. Some time ago, I sent a patch to Rails core, wich added the functionality to define index lengths in the migrations. For example:
add_index(:accounts, [:name, :surname], :name => 'by_name_surname', :limit => 10)
While I wait a decission from Rails [...]

continue reading >>


Define index lengths in your migrations published 8 months ago by Emili Parreño


Define index lengths in your migrations published 8 months ago by Emili Parreño


Migrating to acts_as_taggable_on from acts_as_taggable_on_steroids published 8 months ago by Sam Lown

The Acts As Taggable On Steroids plugin for Rails has certainly been around the block a few times, I indeed have been using it in many of my projects for a few years. Now the time has come however where the lack of named_scope support is more than a minor irritation, and its time to move on: Acts As Taggable On is a fine replacement with all the named scope magic and additional context support ...

continue reading >>


Planetoid, a lightweight planet published 8 months ago by Jaime Iniesta

I’ve released today planetoid, a really simple and lightweight planet (feed aggregator) for small communities online.
planetoid will let you create users and feeds from their blogs, which will be parsed automatically and shown on the front page. You can set up a cron job to do this task automatically. planetoid is intentionally simple: I didn’t [...]

continue reading >>


Planetoid, a lightweight planet published 8 months ago by Jaime Iniesta


Listen Hotmail, I’m no spammer! published 8 months ago by Jaime Iniesta

Sometimes it looks like Microsoft’s mission in this world is making web developers life miserable. Yes, I’m sure the World will be a better place when this company finally disappears, but it looks like we’ll have to wait for a while for this to happen. For now, we’ll have to follow their absurd rules and [...]

continue reading >>


Listen Hotmail, I'm no spammer! published 8 months ago by Jaime Iniesta


How to import data from CSV files in Rails published 9 months ago by Emili Parreño

CSV is commonly used to import data from an external source. You can populate your Rails applications with emails, user names, phone numbers etc. from other applications, databases, excel files…
Let me show you an example.

#users.csv
kevin, kevin@gmail.com
Jhon, jhon@gmail.com

require 'csv'
CSV.open('users.csv', 'r').each do |row|
User.create(:username => row[0], :email =>...

continue reading >>


How to import data from CSV files in Rails published 9 months ago by Emili Parreño


How to import data from CSV files in Rails published 9 months ago by Emili Parreño


EuRuKo 2009 is over! published 9 months ago by Emili Parreño

The European Ruby Conference is over. As a member of the organizing team, I would like to thank you for coming, and for contributing to the success of Euruko 2009.
We’ve worked hard the lasts few months to organize a successful event, and it has been fantastic to read your positive comments, and confirming that you [...]

continue reading >>


EuRuKo 2009 is over! published 9 months ago by Emili Parreño


EuRuKo 2009 is over! published 9 months ago by Emili Parreño


EuRuKo 2009 (Barcelona’s Edition) published 9 months ago by Javier Ramírez

What a fantastic weekend it was.
I met interesting people, I learnt a bunch of new tricks, I had fun in the talks (and out of them too!), and it didn’t rain so we could hang out of the citilab building between sessions. win, win, win.
As you know I was a part of the organization, [...]

continue reading >>


EuRuKo 2009: That’s all, folks! published 9 months ago by Jaime Iniesta

So, there it is, we’ve done it, EuRuKo 2009 is over!
It has been a really pleasing experience for all of us on the organization team, we’ve had a really, really good time sharing ideas and code to organize the main european Ruby conference. I have to admit it, we were really surprised to see Spain [...]

continue reading >>


EuRuKo 2009: That's all, folks! published 9 months ago by Jaime Iniesta


EuRuKo '2009 published 9 months ago by Sergio Gil


Ruby: EuRuKo 2009, new dose of inspiration. published 9 months ago by Fernando Guillén

This weekend is the EuRuKo 2009, a very concentrate juice of Ruby programmers. 230 tickets were sold withing 3 days almost two months ago.
I am one of the big bunch of people that is on charge of the organization of this edition, I am helping on whatever is in my hand, I am very proud [...]

continue reading >>


¿El emperador está en pelotas? published 9 months ago by Sergio Gil


Cucumber, Selenium, Webrat, and Windows published 9 months ago by Javier Ramírez

I spent last Saturday hacking around with some really smart people in Madrid. It’s not widely known than in Spain there’s a thriving Ruby on Rails community -my guess would be a language thing- but if you take a look at some of the Rails patches, Hackfest winners or the official Rails documentation project, you [...]

continue reading >>


Speaking at EuRuKo 2009 published 9 months ago by Javier Ramírez

It’s only two weeks for EuRuKo 2009, the most important Ruby conference in Europe.
As you probably know, EuRuKo is a grassroots itinerant conference, entirely organized by -and for- Ruby developers. This year, the conference will be held in Barcelona, and I have the honor of being a -tiny- part of the organization as a [...]

continue reading >>


Satanizando Java published 9 months ago by Fernando Guillén

(Esto lo tenía por ahí desde hace tiempo… )
Últimamente está muy de moda eso de satanizar los grandes lenguajes corporativos en pro de los lenguajes de juguete.
Llevo 5 años trabajando con Java y sabéis qué os digo: que me uno a ellos, vine aquí para divertirme y creo que para eso se necesitan juguetes.

continue reading >>


Rails template for Google app engine published 10 months ago by David Calavera


Parallel Assignment in Ruby and the conditional ternary operator published 10 months ago by Javier Ramírez

You already know how parallel assignment in Ruby works

irb(main):001:0> a,b=1,2
=> [1, 2]
irb(main):002:0> p a
1
=> nil
irb(main):003:0> p b
2
=> nil

and you also know how the conditional operator (the only ternary operator in Ruby) works.

irb(main):004:0> false ? a : b
=> 2

so maybe you are thinking of putting that together and, given a “wadusable...

continue reading >>


Upgrading to RadRails 1.2.1 published 10 months ago by Javier Ramírez

Aptana RadRails 1.2 is out there. If you are lucky enough, your Aptana installation will prompt you to upgrade and everything will go just fine.
In case your installation is a bit too old, or if you installed everything manually and when checking for updates Aptana says there’s nothing new, you can still install the latest [...]

continue reading >>


Manejo de excepciones en Rails published 10 months ago by Emili Parreño


Manejo de excepciones en Rails published 10 months ago by Emili Parreño




Contact

The best way to contact the members of Spain.rb is through our twitters or blogs. You can also find us at most ruby-related mailing lists and irc channels.


Proudly powered by Planetoid