| The information on this page pertains to NetBeans IDE 6.5. If you are looking for information about Ruby Gems in 6.1, look here. |
You can install gems from the command line or you can use the NetBeans Gems Manager.
To install gems from the IDE, choose Tools > Ruby Gems from the main menu, and select the Ruby Platform to which you want to install the gem.
If this is the first time you are using the Ruby Gems manager, you might want to click the Manage button to open the Ruby Platform Manager. Make sure that the Gem Home, Gem Path, and Gem Tool settings are correct. (If you are not sure of the difference between Gem Home and Gem Path, click Help to see the definitions).
Tip: If you are using the JRuby interpreter that comes bundled with the product, you might want to set up a different Gem Home. That way, if you install a later version of the IDE, or if you install a separate JRuby interpreter, you can continue to use that repository. Note that when you uninstall the IDE, the uninstaller will not uninstall the JRuby repository that is under the installation directory if you have added stuff to it. Which is another good reason to set up the Gem Home elsewhere.
Note: If the Gem Home and Gem Path directories require root access, see the Troubleshooting section for important information about permission problems.
When you want to speed up gems fetching a little bit you might turn off retrieving of:
You can do this in the 'Settings' tab in the in the RubyGems Manager as shown on the following screenshot:

On the background this simulates using (or not) following options of the gem tool:
-d, --[no-]details Display detailed information of gem(s) -a, --all Display all gem versions
This section provides solutions for some of the common problems you might encounter when you use the Ruby Gems manager.
In order to use the _gem_ command, you must install RubyGems into your Ruby installation. If you are using the bundled JRuby installation, this is already the case. See the Installing RubyGems chapter in the RubyGems User Guide at rubygems.org for information on how to install RubyGems.
NetBeans just uses gem tool on the background. If the gems fetching fails for you, be sure to check whether it works from command line, particularly the following commands:
gem list --local --details gem list --remote --detailsIf it does let us know about your problem. Thanks.
The IDE also needs to have write permissions on the gems repository in order to install, upgrade, and uninstall gems.
If you have switched to /usr/bin/ruby on your Linux box, for example, the gem installation
directory is probably not writable without root privileges. The IDE will inform you of
this problem, linking to this wiki page, with the following dialog:

There are several ways to solve this:
joe@rubycomp:~$ cd /var/lib/gems/ joe@rubycomp:/var/lib/gems$ sudo chown -fR joe . [sudo] password for joe:
sudo apt-get install build-essential autoconfIn the case you are using Ruby package from Ubuntu repository, be sure you also install ruby<version>-dev package, like ruby1.8-dev or ruby1.9-dev. Otherwise you can't compile any native extensions. E.g.
sudo apt-get install ruby1.8-dev
Please update this Wiki page section for your OS if it is not mentioned here yet.
Take a look at this page to see how to install Ruby on some systems.
Install ruby-debug-ide:
spectator:/$ sudo gem install ruby-debug-ide
Make symbolic link:
spectator:/$ sudo ln -s /var/lib/gems /usr/lib/ruby/gems
That's all! Your IDE will detect the installed fast debugger and will use it by default.
| chooseRuby.png | ![]() |
15103 bytes |
| gemsmgr.png | ![]() |
18158 bytes |
| permission_error.png | ![]() |
10301 bytes |
| rubygems_settings.png | ![]() |
8045 bytes |