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.
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
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
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...