netbeans on ubuntu

I just installed Netbeans 6.7 on Ubuntu 9.4 and all seems to be OK, except I get the following error when I try rake tasks:

Rails requires RubyGems >= 1.3.2 (you have 1.3.1). Please `gem update --system` and try again.

Thank you for any help Viorel

I just installed Netbeans 6.7 on Ubuntu 9.4 and all seems to be OK, except I get the following error when I try rake tasks:

If you're installing Netbeans, what's wrong with using the latest version (6.8)

Rails requires RubyGems >= 1.3.2 (you have 1.3.1). Please `gem update --system` and try again.

and so the first thing you did was run "gem update --system" and then what happened...

I just installed Netbeans 6.7 on Ubuntu 9.4 and all seems to be OK, except I get the following error when I try rake tasks:

Rails requires RubyGems >= 1.3.2 (you have 1.3.1). Please `gem update --system` and try again.

That should probably be sudo gem update --system

Colin

it's not going to work on Ubuntu if you have installed Ruby Gems from repositories.

jacek@jacek-desktop:~$ sudo gem update --system [sudo] password for jacek: ERROR: While executing gem ... (RuntimeError)     gem update --system is disabled on Debian. RubyGems can be updated using the official Debian repositories by aptitude or apt-get.

Jacek

Thanks for your quick answers. Michel: 6.7 is the latest version on Ubuntu repository, it comes with apt-get Colin: You are right. Both: Tried that. It seams I didn't do it where I should, because in terminal I get sudo: gem: command not found Can I do it from Netbeans?

it's not going to work on Ubuntu if you have installed Ruby Gems from repositories.

I think it is generally considered better not to install from the repositories. I used the technique from http://www.hackido.com/2009/04/install-ruby-rails-on-ubuntu-904-jaunty.html with good success. I don't know whether there has been an update for later ubuntu but I doubt that it has changed much anyway.

In fact I use this script in case anyone is interested (tweak as appropriate for folder names). Also I see that 1.3.6 is latest version now.

# this derived from http://www.hackido.com/2009/04/install-ruby-rails-on-ubuntu-904-jaunty.html # bits for building stuff sudo apt-get install build-essential # ruby and mysql stuff, this assumes that the lamp stack with mysql has already been installed sudo apt-get install ruby ri rdoc libmysql-ruby ruby1.8-dev irb1.8 libdbd-mysql-perl libdbi-perl libmysql-ruby1.8 libmysqlclient15off libnet-daemon-perl libplrpc-perl libreadline-ruby1.8 libruby1.8 rdoc1.8 ri1.8 ruby1.8 irb libopenssl-ruby libopenssl-ruby1.8 libhtml-template-perl wget -N -P /home/colinl/downloads http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz tar xvzf /home/colinl/downloads/rubygems-1.3.5.tgz cd rubygems-1.3.5 sudo ruby setup.rb cd .. rm -rf rubygems-1.3.5 echo " making symlinks - not sure if this will always be necessary, must be done if gem -v does not work" sudo ln -s /usr/bin/gem1.8 /usr/local/bin/gem sudo ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby sudo ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdoc sudo ln -s /usr/bin/ri1.8 /usr/local/bin/ri sudo ln -s /usr/bin/irb1.8 /usr/local/bin/irb # rails latest version sudo gem install rails --no-rdoc --no-ri # any other versions needed #sudo gem install rails --version 2.3.2 --no-rdoc --no-ri #sudo gem install rails --version 2.3.3 --no-rdoc --no-ri

Colin

Again, thanks Colin this is great for ROR but I tried Netbeans.

Hey, not my intent to hijack the thread, but what’s better about Netbeans on *nix system compaired to gvim or other advanced editor?

Gintautas: I don't know. I want to find out!

I think I only use 10% of features of gvim and still it gets the job done :slight_smile: That’s why I am asking :slight_smile: what benefits Aptana or Eclipse give over gvim? :slight_smile:

Depends what you like, but the conversation's been had before: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/25a7be28d50fe39b/53b59dda9d27c053 http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/646d4c8a65ece7e3/3a76824220d42fe9 http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/8959e8226604ba68/8e7c5d67de07e82f

YMMV

You were right, Bigos. It doesn't work. Apt-get updates rubygems for ruby, not jruby from Netbeans. Anyway, I resoved the problem by installing 6.8 from Netbeans. Thank you all! Gintautas: Just curiosity: Did you ever tried Netbeans? Michael: English is not my native language. What is YMMY?

You were right, Bigos. It doesn't work. Apt-get updates rubygems for ruby, not jruby from Netbeans. Anyway, I resoved the problem by installing 6.8 from Netbeans. Thank you all!

I change the Netbeans project properties to *not* use jruby. Instead, I prefer to set the platform to be my OS' Ruby install, and Mongrel instead of Webrick. It's annoying if the responses from the IDE debugger and the console are different - which they might be if their platforms are different.

Michael: English is not my native language. What is YMMY?

YMMV is short for "Your Mileage May Vary", and is used to mean that different people have different experiences and preferences. So I used it to imply that all those conversations about "benefits" or not of using IDEs are very subjective - one man's benefit is a hindrance for someone else. Listen to everyone's opinions, then make up your own mind about what's "best" for you :slight_smile:

Answering only for myself, when I was a newbie on both Linux and RoR, I saw NetBeans as an 'all in one' environment that had syntax highlighting. Made the learning curve slightly shallower. I do emacs + multiple bash windows now, too, but when starting out, especially coming from the Java world, it is a gentler transition.

Of course, TextMate on OS X is the only TRUE editor... :slight_smile: