Tuesday Dec 09, 2008
Tuesday Dec 09, 2008
If you have been wondering why this blog has been so quiet for so long, it is because I was working on a NetBeans Ruby book with Brian Leonard. Brian asked me to help him with the book and I am glad that he did. It was a good experience working with Brian and I am happy with how it turned out.
The book is published by Apress and is available in ebook and hard copy here.
In the book we delve into the details of how to use the IDE to develop Ruby and Ruby on Rails projects. If you haven't tried NetBeans IDE 6.5 yet, I am sure you will find the book helpful from start to finish. For those who are upgrading, the book helps you to learn about the new features. Even if you are an experienced NetBeans user, I bet you will find stuff you don't know, especially in the chapters on using the editor and on customizing the IDE.
We got a lot of help from a lot of people along the way. Foremost were the NetBeans Ruby engineers Erno Mononen and Martin Krauskopf who patiently answered every question. Erno was also the book's technical reviewer. Tor Norbye contributed to the editing chapter, and Nick Sieger helped with the chapters about Warbler and JRuby. When it came to GlassFish, we leaned on Arun Gupta and Peter Williams.
I would also like to thank the frequent posters to the users@ruby.netbeans.org alias, such as Bharat, Anthony, and James, who provided a good user perspective and answered my requests for information about best practices.
Last, I want to show appreciation for my managers Sophia and Dave for their support all the way through the process, and for my husband who took over most of my chores without complaint so I could spend my spare time working on the book.
Monday Dec 08, 2008
Many of you who are trying out the NetBeans IDE Ruby support are running into the following error message:
Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update --system` and try again.
This is not a NetBeans error message. It is generated by the Rails framework. This error message happens if you upgrade to Rails 2.2.2.
To compound the frustration, it seems that the suggested command gem update --system does not work on all versions of Ruby Gems. When you try the command, you get a message that there is nothing to update. Fortunately, there is a work around.
Here is one way to fix this Rails/Ruby Gems version mismatch. If you have more than one Ruby installation (for example, you have the JRuby that is installed with the IDE and you have a separate MRI Ruby installation), you need to run the command for each installation. Note that the path to the bundled JRuby bin directory is <netbeans-install-dir>/ruby2/jruby-1.1.4/bin.
In the following steps, replace ruby with jruby if you are updating your JRuby installation.
Open a terminal window and change (cd) to the JRuby or Ruby bin directory.
Type ruby -S gem --version
If the version is 1.3.1, then that installation has already been updated and you are done. Otherwise, continue.
Type ruby -S gem install rubygems-update
Type ruby -S update_rubygems
To ensure that the update happened, type ruby -S gem --version