Announcing rubychallenge.com

About a month or so ago, we begun to work on a new ruby puzzle site entitled rubychallenge.com with Alex Combas.

Some people may think after reading this line: “Yet another ‘not pron’ or ‘pythonchallenge.com’ clone”. Well, i would not say we did not borrow some basic concepts from these great puzzle sites, but our final product will have not very much in common with them: There will be programming puzzles on rubychallenge.com, and the domain suffix is equal with that of the pythonchallenge site. However, the analogy stops here. Rubychallenge will offer an entirely different programming/game/puzzle experience compared to all the similar sites out there, both in terms of game concepts and mechanics, as well as entirely unique site structure/design.

We have tons of ideas in our wiki already, and right now we are fledging out which ones to implement. Alex just set up a working development environment, so after ironing out some ideas crucial to begin, we might even write some code soon 😉
We would like to come up with a presentation/demo page as soon as possible, and possibly a development blog to inform you what’s going on. At some point we would like to incorporate some beta testers, so stay tuned!

Java and Ruby (on Rails)

Being a professional Java programmer myself, i collected some links that might bridge the gap for Java programmers who would like to take a peek at Ruby:

Introductory materials

Java – Ruby integration

  • JRuby – A 1.8.2 compatible Ruby interpreter written in 100% pure Java. Charles Oliver Nutter, one of the JRuby developers in a discussion claimed that “We’re currently working to make JRuby more EJB and J2EE-friendly, so you’re certain to see more of these opportunities.”

The question from the top of every RoR/Java FAQ:

Ajax Goodies:

Not exactly java, but nice Rails+Ajax technology showoff

Canada on Rails observations

According to more people (including me), the nicest wrapup of the Canda on Rails conference can be found here: Canada on Rails, Day One and here (part 2): Canada on Rails, Day Two.

Some things i found interesting/funny:

The first speaker was (surprise, surprise!) David Heinemeier Hansson. He had an interesting slide:

IMG_0880

Alex’s comment:

“David explains in no uncertain terms that some people do shout quite loudly for features to be brought into rails core and when it makes sense to incorporate those features he does, but sometimes it really makes no sense and so he tells them a frank “no” and this sometimes seems to cause people to complain and even threaten to stop using “my free product” which elicits the response that you see in Davids presentation slide above. “

Hmm. Interesting explanation 😉 On the presentation of Amy Hoy:

Second to last was Amy Hoy, and I dont think I need to tell you that she did a great job. Her talk was entitled “Ajax with Rails” so she actually got to demonstrate some live code and even wrote some for us in real time in response to a question someone in the audience asked…

I wish i had the nerves to do this, usually i am happy if i can present my prepared slides at a conference, not write LIVE CODE 😉

For the full event description read Alex’s blog.

Another nice conference notes can be found here: At the canada on rails conference.

Getting started with Ruby on Rails

More people keep me asking about how to get started with Rails. Here is my suggestion:

  • Installation
      • If you do not have Ruby installed, either get it from http://www.ruby-lang.org , or use the package management system of your distribution.
      • Install RubyGems:download it from http://rubygems.rubyforge.org, unpack and install with
        sudo ruby setup.rb
      • Install rails:
        sudo gem install rails --include-dependencies
  • The tutorials
    • Probably the simplest thing after you have installed Rails is to start with Four Days On Rails. It is a simple and practical guide to get a quick overview of the possibilities of Rails, illustrated through building a real-life application.
    • Another very good inroduction is Curtis Hibb’s Rolling with Ruby on Rails. It is more detailed than the first tutorial, also includes a full installation guide (for Win32). Part 2 can be found here, and Ajax on Rails is the third part dealing with (surprise!) Ajax in Rails.
    • Amy Hoy has another nice introduction here.
  • Books
    • The bible of Rails development is definitely the Jolt-award winner Agile Development with Rails. If you would like to do more serious Rails development than just write some simple applications after reading the tutorials, i definitely recommend you to buy this book. The tutorials are very good to get the idea of what is RoR about, but they can not substitute the book.
    • There are more interesting books out there, like Rails Recipes or Ruby for Rails but to get you started, the above mentioned book should be enough. If you want more, be sure to check out these as well.

Ruby on Rails and Ubuntu

Although i have nice Ruby on Rails support at dreamhost, i have decided to install RoR to my local machine. IMHO a local RoR, combined with Radrails and WEBrick is the simplest and quickest solution, usually fully enough for development purposes.

To install Ruby on Rails, you just need to do 3 things:

  1. Install Ruby
  2. Install RubyGems, a package management system for Ruby
  3. Once you have RubyGems installed, it is a piece of cake to install new packages. In this concrete case:

gem install rails –include-dependencies

And you are on rails! This was easy, wasn’t it?

Well, yes, unless you happen to use Ubuntu .

Under Ubuntu, the MySQL-Ruby binding was outdated. No problem, just get the newest mysql-ruby gem:

gem install libmysql-ruby
At this point the trouble begun. Instead of installing the mysql binding, i got every kind of nasty error messages, including:

ERROR:  While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
ruby extconf.rb install mysqlnchecking for mysql_query() in
-lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no

WTH?! I have googled a day to find the problem, then also wrote to the RoR and Ruby mailing lists, but got no answer. As i came to know later, this happened because my problem had nothing to do with Ruby, Rails or MySQL.
After several hours of trying every possibility, i have been checking the last one: Do i have gcc and make on my machine? Well, i did not! I have thought a decent linux distribution should have make, gcc et al – and i was wrong (considering that Ubuntu is a decent distro).

Ubuntu is a very nice distribution, for desktop usage. However, if you are planning to use it for development, compiling etc., double check whether you have basic development tools (apt-get install build-essential), gcc and whatever you may need for compiling/deploying your applications.

Or install Rubuntu

Google Summer of Code is back!

Google SOC is opened for 2006.

I think nothing can prove the success of the project better than the very fact that in 2006, google is again offering an opportunity to fund talented students from the whole world (See the geographical distribution of the 2005 SOC coders) to participate in top open source projects.

The Ruby/Ruby on Rails community didn’t respond quickly enough last year, but hopefully in 2006, backed by rubycentral.org we will not miss this great opportunity to get some motivated and talented people on board.

rubyrailways.com up and running!

I have registered to host my website at dreamhost yesterday and have to say i am quite impressed. The package contained also a free domain registration – the address was up and running in 3 hours. The registration took about 3 minutes, after which i had e-mail account, MySQL databases, ftp, WordPress, MediaWiki, Gallery – just to name the most crucial ones – up and running (yes, this was all done during the 3 minute setup). The support and the control center (the ‘panel’) is feature-rich and very user friendly. Rails is rolling on fastcgi. Kudos dreamhost! I can’t wait to deploy my first Rails application…