RubyInstaller: Voting is over and the results are…

Posted: July 25th, 2009 | Author: FreedomCoder | Filed under: Uncategorized | Tags: , , , | 8 Comments »

Hello Hello!

I’m happy to announce — 24 hours late on it — that the voting is over for the website contest I started last month for getting RubyInstaller (known as OneClick) a new home.

Thank all the designers who participated

First I would like to thank all the designers that contributed over the wiki with their design proposals and comments.

Thank you contributors

Second but no less important a huge thank you to all the members of the Ruby community that contributed money to the campaign over pledgie.

26 people donated 900 dollars!!!

The designer who created the selected design is going to receive all that.

Thank you!

Selection of the design

So, the polldaddy results:

With a total of 339 votes:

Participant Votes %
Pavel Macek 160 47%
Ben Alpert 100 29%
Francesco Agnoletto 43 13%
Thuva Tharma 25 7%
Silviu Postavaru 11 3%

Congratulations Pavel Macek!

I must say that was hard choice to all who voted, I couldn’t personally decide which one to vote since each design focused on important aspects.

Thanks to the community

Thank everyone that spread the word over Twitter, blog posts and mailing lists.

What’s next?

Well, now getting in touch with designer and arrange the GitHub repository for him to publish the HTML and CSS of the designs.

Then, built it over Radiant application and deploy!

Over the past weeks Jon has been working on documentation, FAQ and collecting information at the GitHub wiki page.

Thanks Jon!

Once everything is in place, content will be ported/migrated to the new website.

When the final installers?

There are still some issues with own Ruby tests, but expect a newer preview release soon.

THANKS EVERYBODY WHO VOTED AND DONATED!

(Via DEV_MEM.dump_to(:blog) – Multimedia systems blog.) Original Link: RubyInstaller: Voting is over and the results are…


RubyInstaller: Updated packages, and other news.

Posted: July 15th, 2009 | Author: FreedomCoder | Filed under: Uncategorized | Tags: , , , , | No Comments »

A few days of silence in the middle, but definitely progress in Windows land… Readline, new packages and more news…

Pure-Ruby Readline for the win!

If was the case that under your environment every time you use IRB your CPU went crazy, you will be happy to hear that we found the problem.

More than just find it, we put our some money to it and paid Park Heesob (from win32utils project fame) to code a Pure-Ruby Readline library.

The crazy part is that works on 1.8, 1.9, on Windows and Linux!, even more crazy, it also worked under Rubinius!

The code is in GitHub here

Latest packages in RubyInstaller download page have replaced the GNU Readline binary with it, and IRB now works normally.

Ruby 1.9.1-p129 got out.

As announced in Ruby-Lang website (here) 1.9.1-p129 went out last week.

While test on Windows for either trunk and 1.9.1 branch still segfault, I decided to do another release of this and put the 7zip packages in the downloads page at RubyInstaller.

Yes, no official Windows Installer yet, still need to iron some quirks (mentioned in previous post here)

Again, you can download those from usual place

Moved to Windows 7

I definitely been one of the late adopters in OS changes. Been using Windows XP for work for the past 7 years (moved directly from Windows NT4) — yeah, love to skip versions.

So decided to install latest Release Candidate as main OS, and start using it. So far, the experience has been great.

Keep in mind that I rarely turned my laptop off or restarted it (even with XP). Sleep and hibernation are the two options I mostly use, and haven’t restarted the computer since installed Windows 7, so is good :)

The following is a list of things I noticed that will love to expand in other posts:

Mount Users in other partition, don’t keep with your system

Like on Linux, dedicate a partition to your personal files, so I did it for the user folder. Is tricky, but can be done. This ease the restoration process of the OS since you don’t need to worry about losing your personal files.

Set HOME

Ensure HOME get set to %HOMEDRIVE%@%HOMEPATH%@. This is to make RubyGems and Ruby expansion of @~@ will work properly (and avoid nasty issues with known scripts or gems).

Console 2 halts

For some reason, the combo of Console 2 and VIM when working with Git just halts, not accepting any input. This also affected IRB, which lead me to think that is readline related.

Anyhow, installed GVim and installed Fabio Akita’s vimfiles (instructions here)

Then, ensured Git uses it doing git config --global core.editor gvim

Hidden files behave as read only?

Found that Ruby and some programs don’t let you modify hidden files. They just return access denied.

This seems weird, since Notepad can edit those files without issues.

Will investigate further, seems a bad usage of Windows API.

Don’t pollute your system.

Put all your tools, DLLs and your scripts in your user folder. Mine is %HOME%\Tools\bin, add this to your User environment variables: %HOME%\Tools\bin, et voila!

Don’t copy files to system32 blindly, this includes SQLite3, MySQL or any of these tools, putting things there make things harder to find or update later.

Also, that requires Admin rights, which are annoying if you don’t have them (I have UAC to the highest value to avoid do any stuff that normal non-admin users will do).

See my Tools layout

Some gem issues and news

While doing the move to new OS, decided to build a few gems again, and maybe update them.

MySQL 5.1 and mysql gem are a nightmare, stick to 5.0 for now.

Yeah, it seems that mysql Ruby C Extension have several memory issues. Stick to 5.0 for know (or switch to DataMapper, I heard they got things working on Windows!) :D

Been working in my own fork to support MinGW properly. Check the code at GitHub:

http://github.com/luislavena/mysql-gem

Almost 100% cross-platform SQLite3 ruby gem!

Lot of progress on this, partially stolen from do_sqlite3 (and viceversa!) ;)

My fork here is capable to build Windows binaries on Linux/OSX.

Ideas of making fat binaries are around, but I believe this can be worked out with some love to RubyGems (discussed last year).

Will make binaries of those gems this week.

So, what are you waiting for?

Start using it!, like Mike Hodgson that reported his success here

(Via DEV_MEM.dump_to(:blog) – Multimedia systems blog.) Original Link: RubyInstaller: Updated packages, and other news.


Desinfecta tu html (sanitizer)

Posted: June 13th, 2009 | Author: FreedomCoder | Filed under: Uncategorized | Tags: , , , | No Comments »

simple_sanitizer_html es un plugin muy sencillo que arme para Rails, que te permite básicamente escapar el html.
Lo interesante de este plugin es que solo debemos extender el modelo y de forma automática guarda todo los registros escapando el html en la base de datos.

Instalar simple_sanitizer_html

  http://github.com/chebyte/simple_sanitizer_html/tree/master

Uso Práctico

# ruby script/generate model Post title:string copy:text
class Post
 simple_sanitizer_html
end
$ ruby script/console
Loading development environment (Rails 2.3.2)
p >> p = Post.new
=> #<Post id: nil, title: nil, copy: nil, created_at: nil, updated_at: nil>
>> p.title = "<script>alert('hi tuquito')</script>"
=> "<script>alert('hi tuquito')</script>"
>> p.save
=> true
>> p.title
=> "&lt;script&gt;alert(&#39;hi tuquito&#39;)&lt;/script&gt;"
>>

Este plugin puede ser muy útil para prevenir ataques XSS o del estilo

(Via Chebyte’s Blog.) Original Link: Desinfecta tu html (sanitizer)


RubyInstaller – State of One-Click

Posted: May 5th, 2009 | Author: FreedomCoder | Filed under: Uncategorized | Tags: , , , | No Comments »

I wont be lame and say been a while since last blogged, which is true, but is not the reason I’m writing this.

I’ll like to provide a better look on what’s going on at RubyInstaller project, clear out some repeating questions and give hope to people.

Please keep reading if you’re interested (will try to make it short, I promise).

Current One-Click Installer – Stable State

I keep getting several emails about current installer (labeled 186-27 RC2). While it says Release Candidate 2, it has proven to be really stable, not getting any new report of issues or major bugs in the installer, Ruby or RubyGems.

So even it says RC2, it is stable people, please use it (I do).

I’ve been working in the new installers, that’s why there was no updated version.

1.8.6, 1.8.7, 1.8.x?

I tried to explain why RubyInstaller project is sticking with 1.8.6 for 1.8.x line of Ruby support. It seems needs further explanation.

Lot of packages bundled in current installer, see for yourself here

Most of those haven’t been updated in years, which mean that manually I need to go and patch all those to make them work with 1.8.7 due some changes in the extensions and even some features (cough, incompatibilities) back-ported from 1.9.x development.

Doing that amount of work is beyond RubyInstaller project job or role. I’ve invested lot of this time fixing several projects for Windows compatibility and provide tools to ease the cross platform integration (rake-compiler).

We can’t do more than that. I can’t do more than that.

I cannot endorse 1.8.7 usage or support it, since I’m not an active user of that particular version.

So go ahead, checkout the Subversion repository of current installer like this:


svn co http://rubyinstaller.rubyforge.org/svn/trunk/installer-win2/ current-one-click

Read the instructions and build your own version of 1.8.7.

Don’t have a VC6 license required to build it? then clone the MinGW version over here

All the code is out there, all the instructions are there. There is no rocket science about the process, just time, your time.

When will be a 1.9 One-Click Installer?

When people start helping out, seriously.

On a weekly basis I get errors from people facing issues with several Gems, way beyond the scope of RubyInstaller project. Even so, I try to help them out.

That is a time consuming tasks, being the only one with all the world knowledge of Windows…

Seriously guys, do you think I know all the answers to all your Windows projects under X, Y, Z version of OS, Rails, permissions, libraries and gem combination? I’m only human. /rant

Anyhow, progress has been made in getting both 1.8.x and 1.9.x working with the new MinGW based installer. Test packages (compressed with 7-zip) are available at the following URL:

http://rubyinstaller.org/downloads/

Be aware that no bug report will be accepted for those versions, yet.

Also, keep in mind that 1.9.1-p0 doesn’t complete it’s own tests on Windows, which is a real problem to proper distribute an official version.

When the Installers are going out for 1.8.6 and 1.9?

The updated-installers branch at GitHub contains the MSI recipes to build both 1.8 and 1.9 versions of the installer.

The following is the list of things that needs more work before release:

  • Installers requires Administrative privileges (elevated rights).

    Looking into a way to avoid it.

  • Does not ask about adding the Ruby to the PATH.

    It does always, which make co-existence with other Ruby a problem.

  • Lot of your gems will be broken.

    You could blame Ruby and rbconfig for this. Basically, MinGW and VC6, even they use the same CRT, they are marked as different platforms (i386-mingw32 and i386-mswin32).

    Several gems evaluate for mswin32 (even worse, some of them check RUBY_PLATFORM with win32 (see this post)

    Cannot fix all those gems, so is time for you to contribute too.

What can you do to help?

I was waiting for that question to show up! :-D

Download those versions (including the fake DevKit), put your helmet, gloves and start using it like I do. Some tips:

  • Add the compiler to the PATH when installing gems that contains extensions.

    If you gem fails during installation and shows the Building native extensions legend that means you need the compiler around

  • Check for RUBY_PLATFORM in the gems

    If the gem doesn’t work after that, peek into the gem code for RUBY_PLATFORM conditions and see if mingw is being considered

  • Ask the developer to provide native versions of the gem

    If the gem requires several libraries and other stuff. Politely request the gem author to create a native binary of that gem for Windows.

    Point him to rake-compiler project, and some projects that includes tasks for building cross platform packages.

As a last resource, ask them join rubyinstaller-users list and ask questions about to improve the cross-platform compatibility of their projects.

Hint: latest json gem needs some love ;-)

Final words

I come from the broadcast video industry, where a release early, release often approach doesn’t work since thousands of dollars can be lost for a couple of seconds downtime.

Releasing something with so many quirks will make people angry, and will not help on solve or improve the image Ruby on Windows already have.

But is as much I can do, it is time for you, Ruby developer, either on Linux, OSX or Windows to take care.

We are talking about Ruby and the Ruby Community, not just Windows.

(Via DEV_MEM.dump_to(:blog) – Multimedia systems blog.) Original Link: RubyInstaller – State of One-Click


Conferencia Locos X Rails tomorrow,

Posted: April 2nd, 2009 | Author: FreedomCoder | Filed under: Uncategorized | Tags: , | No Comments »

Tomorrow starts Locos X Rails conference in Buenos Aires, Argentina. I’m very exited about it! Yesterday I met Desi McAdam, of DevChix fame, and also the keynote speaker Obie Fernandez, founder of HashRocket. I’m eager to hear their talks, and hope to see you in the conf. too!

Desi and Obie at the press meeting for the LocosXRails conf.

Desi and Obie at the press meeting for the LocosXRails conf.

(Via Emmanuel Oga’s Weblog.) Original Link: Conferencia Locos X Rails tomorrow,