Tag: Rails

Ruby for Windows with debug support

Posted by – February 10, 2010

I mentioned somewhere in previous posts I am playing a little with Ruby and Ruby on Rails. Because I do not have an experience yet, there are a lot of situations where I need a debugger to figure out how something works. Unfortunately before I was able to debug anything I spend a lot of time trying to enable debugging in RubyMine. The main problem was in Ruby gems responsible for debugging. This gems are native C libraries and have to be compiled before usage. Of course you can guess that compilation did not work as expected. After long fight and few hours with Google I have managed to prepare a version of Ruby which can be used with RubyMine to debug applications.

Because Ruby for Windows does not require any installation I am able to easily provide you the version I have build mostly in order to save your time and do not describe whole procedure I had to follow during compilation.

The package contains Ruby 1.8.7 for Windows with following gems:

  • actionmailer (2.3.5)
  • actionpack (2.3.5)
  • activerecord (2.3.5)
  • activeresource (2.3.5)
  • activesupport (2.3.5)
  • albacore (0.1.1, 0.1.0)
  • columnize (0.3.1)
  • linecache (0.43)
  • net-sftp (2.0.4)
  • net-ssh (2.0.19)
  • rack (1.1.0, 1.0.1)
  • rails (2.3.5)
  • rake (0.8.7)
  • RedCloth (4.2.2)
  • ruby-debug (0.10.3)
  • ruby-debug-base (0.10.3)
  • ruby-debug-ide (0.4.9)
  • rubyzip (0.9.4, 0.9.1)
  • sqlite3-ruby (1.2.5)

Installation is very simple. Uncompress files to C:\Ruby directory and add C:\Ruby\bin path to PATH environment variable.

Download Ruby 1.8.7 for Windows with debug support

My beginnings with Ruby

Posted by – August 23, 2009

Ruby LogoSince some time I have had a feeling that I should turn my eyes in direction other than .NET and technologies connected to it. Maybe not as a new path of career, because I have invested a lot of time to get to the point where I am now, but as something additional what can give me some new perspective and help to become a better developer. Because I cannot learn all available technologies I had to choose one and only one of them. After reading some blogs and mostly because of Jeremy D. Miller’s opinion my choice fell on Ruby and the Rails. So many developers are excited about this technology, I decided to find out what is a source of theirs excitement.

So how am I going to learn Ruby? First of all I always try to start from a book. In this case I am going to read (in fact I have already started yesterday) Polish translation of “Ruby in a Nutshell” by Yukihiro Matsumoto. I think and the author has the same opinion that this is not the book for someone who is new to programming and wants to learn his first language. The “Ruby in a Nutshell” is something like language reference but in more accessible form so for me (developer with above 8 years of commercial experience) is perfect. I do not need 20 pages of description how to use while loop or what are iterators and where can be used.

I am not able to read this type of book from end to end without touching computer so during reading I am going to play a little bit with the language itself in a more practical manner. In order to do it I had to setup a development environment and there I faced first problems. Turned out that current version of Ruby (1.9) for Windows does not have official all-in-one installer. There is installer for version 1.8 and some preview installers for 1.9 which do not work perfectly (at least on my Windows 7 machine). Because of this I had to install Ruby manually using binary distribution and again I had problems. Of course binaries were in a form of compressed file so I uncompressed them and moved to C:\Ruby directory. Secondly I have added C:\Ruby\bin\ path to the environment variables. In my opinion this should be all I have to do to start learning but turned out that I was wrong. The official binary distribution does not contain all required libraries and was crashing from time to time. After some googling I have found very useful blog post (unfortunately I have lost its address) which solved my problems pointing where I can find missing libraries and where should I put them.

When I had Ruby environment ready to work, theoretically I was able to start playing with it but … I am .NET developer and I used to use reach IDEs with syntax highlighting, suggestions, debugging, refactoring tools etc. I decided to find such tool but about it, learning progress and my thoughts about Ruby from perspective of my quite long experience with .NET I am going to write in some of future posts.