Railscast script II

Hi there

Some of you would remember Railscast script, so I coded a new version using SQLite3.

The new version is this one and the empty database is that one. :-)

Enjoy it

P.S. Remember to rename the empty database file from EmptyRailsCastDownloader.db to RailsCastDownloader.db.

 

Tributo de George Mileson a Bruce Springsteen

Hola

Un buen amigo mio (George Mileson) acaba de sacar su segundo disco (autoproducido y autofinanciado al igual que el primero) y lo presenta este viernes en Luz de Gas. Además de este hecho, incluye un tributo a su músico preferido, el Sr Bruce Springsteen como podéis ver en la web del club de fans oficial.

Así que no os lo podéis perder, si os gusta el buén rock tenéis una cita a la que no podéis faltar este viernes dia 3 de Abril a las 22:00 (apertura de puertas a las 21:00) para escuchar a este pedazo de músico que intenta abrirse paso en el difícil mundo de la música con su propio esfuerzo (no como toda esta panda de triunfitos que tienen padrinos y van a lo comercial).

George hace la música que le gusta :-)

 

Railscast script

Hi

As some of you know, I am coding using the Ruby On Rails framework right now. Apart of this, I am a huge fan of http://railscasts.com/ and I like to watch the screencasts published in it.

Some weeks ago and during four weeks, my internet connection took me back almost to the 56 Kb modem age (my download speed was 100 kbps) and I was not able to watch the published episodes. Years ago I coded a perl script named deb-downloader because I was in a similar situation and I had to upgrade my Debian sid so I decided to code a little ruby script to download all the episodes from wherever I was and watch them at home.

This is the script and it is used for downloading the episodes you don’t have (the episodes already downloaded are stored in a text file and to not be downloaded again). If you like this script, you are free to use it, modify it and distribute it (it is under the GPL license) and even send me suggestions about how to improve it or add new functionalities.

Btw, I have downloaded all the episodes and I’m waiting for the new one (it is usually published every Monday).

 

Lenny (Debian GNU/Linux 5.0) released

Hi

Good news for the open source world. Lenny, the new Debian’s stable version, is out :-)


lennybanner_indexed

Read about it here

 

RoR and SQLite3 problems

Hi

I wrote an entry some time ago about the one-file SQL engines and I wanted to code an experiment about a website using SQLite3 as database. I coded a little site named http://www.cheatsheetsandrecipes.com and it worked ok, so that was the time to deploy it in my server in production mode.

Once the site was deployed, I spent some days trying to solve a problem with my database queries and finally I found the problem. There is a problem with rails 2.2.2 and sqlite3 version (explained here) which forces me to change to mysql and cancel my experiment because in my workstation sqlite3’s version is 3.5.9 and in my server it is 3.3.8.

Now the web is working with mysql (maybe I’ll change it again with the new debian stable version codenamed ‘lenny’ which is going to be release this weekend if everything works fine) and feel free to provide cheatsheets and recipes.

See you.

P.S. Maybe accessing to http://www.cheatsheetsandrecipes.com doesn’t work. It is because I bought the domain some hours ago and dns are replicating the ip address (be a little patient).

P.S.S. http://www.cheatsheetsandrecipes.com is beta, don’t be cruel with it (it began as an experiment and there are a lot of things to improve).

 

Euruko 2009

Hi there
Some days ago, I knew that Euruko 2009 (the european Ruby conference) will be placed in Barcelona next May 9-10th. Some days ago too, I joined to Barcelona On Rails group and we will started a working group to help to the Euruko 2009 to be the best one done ever :-)

Next week I will know personally (if I can go to the meeting) the BarcelonaOnRails members (although I think I already know one of them).

If you are a rubyist and you want to do things to help this meeting, join to Barcelona On Rails group (I’ll do whatever I can to help).

 

Wordpress upgraded

Hi there

After a long time without writing anything, I have decided to write this post to thank to all wordpress people the efforts done to publish this fantastic software.

I’ve upgraded this blog from 2.3.1 to 2.7 and what I have had to do are:

  • Execute my wordpress database backup script.
  • Untar latest.tat.gz in my apache directory.
  • Copy the wordpress themes used in the new version.
  • Copy the uploaded files.
  • Change the blog link from the old version to the new one.
  • Access to my blog after upgrading.
  • Click the link to upgrade my database structure.

e voilà!!!!

Isn’t it amazing :-)

 

HTTP data in Rails

One of the things done when a web application is done is collect the HTTP information contained in the request. I did some things in PHP5 and there was (and is) an environment variables named ‘$_SERVER’ which contained information collected by the web server about the request.

In rails, there is the array named ‘request.env’ which contains a lot of items with the http request information, for instance if you want to get the client ip address or the browser used you can use the sentences ‘client_ip = request.env["REMOTE_ADDR"]‘ and ‘client_browser = request.env["HTTP_USER_AGENT"]‘.

A list of what is retrievable is :

  • SERVER_NAME
  • PATH_INFO
  • REMOTE_HOST
  • HTTP_ACCEPT_ENCODING
  • HTTP_USER_AGENT
  • SERVER_PROTOCOL
  • HTTP_CACHE_CONTROL
  • HTTP_ACCEPT_LANGUAGE
  • HTTP_HOST
  • REMOTE_ADDR
  • SERVER_SOFTWARE
  • HTTP_KEEP_ALIVE
  • HTTP_REFERER
  • HTTP_COOKIE
  • HTTP_ACCEPT_CHARSET
  • REQUEST_URI
  • SERVER_PORT
  • GATEWAY_INTERFACE
  • QUERY_STRING
  • REMOTE_USER
  • HTTP_ACCEPT
  • REQUEST_METHOD
  • HTTP_CONNECTION

Something simple, as everything contained in RoR :-)

 

Netbeans for RoR

Hi

As some of your know, I am using Ruby on Rails (RoR) to develop web applications. Some time ago I read this post in the ‘Ruby On Windows‘ blog about coding Ruby and RoR using this IDE (although I think that all this effort done by the Sun boys is with JRuby in mind, not thinking in Ruby itself.

Leaving this ‘little’ detail apart, Netbeans is a good IDE (open-source and free) to code using Ruby and RoR with syntax highlight, code completion and indentation, css preview and other useful features (more info here) contained in it (and it runs on Windows, Linux, Mac OS X and Solaris).

It is available here.

 

MySQL user creation

Things done from time to time tend to be forgotten.

This is one of these things

   GRANT ALL PRIVILEGES ON db_name.* TO 'user'@'%'
   IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

Creating a new user with all privileges on a database.