Ruby ports confused

Hi,

So first Ruby1.8.7 got automatically installed when I wanted to install Nginx. But I really wanted to try Ruby1.9 so I reinstalled Nginx and Ruby. But Rails has problems with Ruby1.9 so I want to revert back to Ruby1.8, but now it's confused, and me as well:

Code:
cd /usr/ports/lang/ruby18
# make install clean
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for ruby-1.9.1_2,1
===>  Extracting for ruby-1.9.1_2,1
=> MD5 Checksum OK for ruby/ruby-1.8.7-p248.tar.bz2.
=> SHA256 Checksum OK for ruby/ruby-1.8.7-p248.tar.bz2.
Why is it detecting a Ruby1.9 conf file? How to clean things up? I always run make clean after the installation, why is it happening?
 
Code:
make rmconfig
/bin/rm -rf work
run those two in
/ruby18/ and /ruby19/
then select options in the
one you want to install
(probably also)
Code:
touch __leave_iconv_after_build.TODO
run that command in the one to install
so ruby-iconv will build later...
 
I'm going down deeper and deeper:
Code:
$ sudo gem18 install pg
Building native extensions.  This could take a while...
ERROR:  Error installing pg:
        ERROR: Failed to build gem native extension.

/usr/local/bin/ruby18 extconf.rb
checking for pg_config... yes
/libexec/ld-elf.so.1: Shared object "libiconv.so.3" not found, required by "libintl.so.9"
/libexec/ld-elf.so.1: Shared object "libiconv.so.3" not found, required by "libintl.so.9"
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
What's missing? iconv as a port, as a gem, as something else?

Should I reinstall my server from scratch and get a book on how to manage ports in FreeBSD? I'm just messing things up, and the handbook doesn't really teaches good/best practices on each topic.
 
/usr/ports/converters/libiconv somehow got
uninstalled or missing or ... gettext depends
on it. (You probably have gettext installed
without libiconv)
...
Search the web maybe for "upgrading ports" "freebsd"
(onlamp.com maybe too)
 
BeastieBoy said:
/libexec/ld-elf.so.1: Shared object "libiconv.so.3" not found, required by "libintl.so.9"
/libexec/ld-elf.so.1: Shared object "libiconv.so.3" not found, required by "libintl.so.9[/code]
What's missing? iconv as a port, as a gem, as something else?

Should I reinstall my server from scratch and get a book on how to manage ports in FreeBSD? I'm just messing things up, and the handbook doesn't really teaches good/best practices on each topic.

You upgraded libiconv without upgrading the ports that depend on it.
# portupgrade -rf libiconv

Could reinstall your server, but unless you do things differently the same problems will occur.
 
BeastieBoy said:
Is there an equivalent to portupgrade -rf using only system tools (make, pkg_add, etc)?

Not that I'm aware. There are other port utilities that do the same thing, like portmaster and portmanager, but they're ports, too, not part of the base.

# pkg_info -R libiconv\*
will show the ports that depend on libiconv, but not in the order they need to be rebuilt. pkg_sort would sort those into the right order, but it's part of portupgrade.

If your installed applications are hopelessly messed up, you can pkg_delete all of them (-a) then update the ports tree and reinstall (just the applications, not the system). Settings in /usr/local/etc should be mostly safe, although a backup is good idea anyway.
 
/usr/ports/Mk/bsd.ruby.mk shows you can set a default version, but I don't know if more is required to do it right. Consider that the ports system currently expects ruby1.8.

/etc/make.conf
Code:
RUBY_DEFAULT_VER=       1.9
 
FWIW, I'd an older laptop for which ruby18 took days to actually install. I switched to ruby19 (reportedly a fix for that issue in 2009) but a few ports still required ruby18 (portupgrade IIRC) so had to revert and pkg_add (IIRC). (Not a ruby18 bug on processors, say, pentium-4 or faster).
 
Back
Top