Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 332119 - dev-ruby/radiant can't load ruby_version_check
Summary: dev-ruby/radiant can't load ruby_version_check
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-10 20:25 UTC by Daniel Bahrdt
Modified: 2010-08-14 08:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bahrdt 2010-08-10 20:25:25 UTC
I've installed dev-ruby/radiant-0.9.1. /usr/bin/radiant fails with

daniel / # radiant
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_requi
to load -- lib/ruby_version_check (LoadError)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `requi
        from /usr/lib/ruby/gems/1.8/gems/radiant-0.9.1/bin/radiant:7
        from /usr/bin/radiant:8:in `load'
        from /usr/bin/radiant:8

other ruby-gems like rails/rake work.

If I start it with:
ruby -I/usr/lib/ruby/gems/1.8/gems/rails-2.3.8/ -- /usr/bin/radiant
It works. My guess is that removing the bundled rails causes this problem as somehow the load paths are incorrect.
Comment 1 Daniel Bahrdt 2010-08-10 20:49:22 UTC
If you change /usr/lib/ruby/gems/1.8/gems/radiant-0.9.1/bin/radiant according to:

--- radiant2    2010-08-05 17:37:23.655494579 +0200
+++ radiant     2010-08-10 22:46:19.991298617 +0200
@@ -4,7 +4,7 @@

 $LOAD_PATH << File.join(File.dirname(__FILE__), '..')

-require 'lib/ruby_version_check'
+require 'ruby_version_check'
 Signal.trap("INT") { puts; exit }

 require 'lib/radiant'
@@ -15,7 +15,7 @@

 app_path = ARGV.first

-require 'lib/rails_generator'
+require 'rails_generator'
 require 'rails_generator/scripts/generate'

 class Rails::Generator::Base

radiant --help works, but I don't know if anything else is broken.
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2010-08-10 21:31:23 UTC
Please attach emerge --info
Comment 3 Daniel Bahrdt 2010-08-10 21:50:24 UTC
Portage 2.1.8.3 (hardened/linux/x86/10.0, gcc-4.3.4, glibc-2.11.2-r0, 2.6.33-zen2 i686)
=================================================================
System uname: Linux-2.6.33-zen2-i686-Intel-R-_Core-TM-_i7_CPU_930_@_2.80GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 10 Aug 2010 02:45:01 +0000
app-shells/bash:     4.0_p37
dev-lang/python:     2.6.5-r3, 3.1.2-r4
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2 -msse4 -mcx16 -msahf -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/redmine/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=core2 -msse4 -mcx16 -msahf -fomit-frame-pointer"
DISTDIR="/usr/local/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --jobs=4 --load-average=8.0 --buildpkg"
FEATURES="assume-digests distlocks fixpackages news parallel parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en de"
MAKEOPTS="-j4"
PKGDIR="/usr/local/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl bash-completion bzip2 cli cracklib crypt cups cxx dri fam fastcgi ftp gdbm geoip gnutls gpm hardened iconv inotify ipv6 ldap mmx mmx2 mmxext modules mudflap ncurses nls nptl nptlonly ntp openmp openvz pam pcre perl pic postgres pppd python readline reflection rrdtool session smp spl sqlite sse sse2 ssl ssse3 sysfs tcpd threads unicode urandom vhosts vim-syntax x86 xattr xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1        emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m       maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 intel         mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage        siliconmotion sis sisusb tdfx tga trident tseng v4l vesa via vmware     voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 4 Hans de Graaff gentoo-dev Security 2010-08-11 12:03:38 UTC
Thanks for the report. This is now fixed in radiant-0.9.1-r2. I've made a few other changes to make sure the generator works correctly.

Daniel: please attach patches as attachments. Including them inline is not robust because whitespace will be mangled and they can't be used as-is.
Comment 5 Daniel Bahrdt 2010-08-13 19:42:17 UTC
After installing 0.9.1-r1 I tried to configure radiant:
radiant -d postgresql radiantcms
cd radiantcms
rake production db:boostrap or even:
RAILS_ENV=production rake production db:bootstrap --trace

It fails with:
Create the admin user (press enter for defaults).
Name (Administrator): 
Username (admin): 
Password (radiant):
rake aborted!
PGError: ERROR:  relation "users" does not exist
LINE 4:              WHERE a.attrelid = '"users"'::regclass
                                        ^
:             SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
              FROM pg_attribute a LEFT JOIN pg_attrdef d
                ON a.attrelid = d.adrelid AND a.attnum = d.adnum
             WHERE a.attrelid = '"users"'::regclass
               AND a.attnum > 0 AND NOT a.attisdropped
             ORDER BY a.attnum

I believe the setup process does not create the necessary db-structure, before trying to access them (see lib/radiant/setup.rb:40). I'm using postgresql. radiant does have write access as it creates a schema_migrations table.
As this is the first time I have ever read ruby code and ruby really isn't that simple to understand, I don't know where else to look.
Comment 6 Hans de Graaff gentoo-dev Security 2010-08-14 08:05:24 UTC
This should now be fixed in radiant 0.9.1-r3.