Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Redmine: undefined method `active_record' [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
stan666
Apprentice
Apprentice


Joined: 25 Jun 2007
Posts: 165
Location: Germany

PostPosted: Mon Sep 16, 2013 10:17 am    Post subject: Redmine: undefined method `active_record' [solved] Reply with quote

Running Redmine on Gentoo is hell on earth! I'm currently running Redmine 2.3.2 via passenger and apache and since some days all i get is

Code:

undefined method `active_record' for #<Rails::Application::Configuration:0x00000000ea5538> (NoMethodError)
  /usr/lib64/ruby/gems/1.9.1/gems/railties-3.2.14/lib/rails/railtie/configuration.rb:85:in `method_missing'
  /var/lib/redmine/config/application.rb:26:in `<class:Application>'
  /var/lib/redmine/config/application.rb:13:in `<module:RedmineApp>'
  /var/lib/redmine/config/application.rb:12:in `<top (required)>'
  /usr/lib64/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
  /usr/lib64/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
  /var/lib/redmine/config/environment.rb:2:in `<top (required)>'
  /usr/lib64/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
  /usr/lib64/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
  config.ru:3:in `block in <main>'
  /usr/lib64/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
  /usr/lib64/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:82:in `eval'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:82:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:127:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:6:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:5:in `<main>'


I already

* re-installed redmine
* re-installed passenger
* updated/rebuilt all my manually installed gems
* removed all gems (local and systemwide) and re-installed redmine with all dependencies

I'm kind of lost here, any help would be appreciated.

Here is some more Gentoo-related information:

emerge --info

Code:

Portage 2.1.12.2 (hardened/linux/amd64, gcc-4.6.3-hardenednopiessp, glibc-2.15-r3, 3.6.11-GN-SMP_x86_64 x86_64)
=================================================================
System uname: Linux-3.6.11-GN-SMP_x86_64-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7700_@_2.40GHz-with-gentoo-2.2
KiB Mem:     6114288 total,   3688836 free
KiB Swap:    2097612 total,   2097612 free
Timestamp of tree: Fri, 13 Sep 2013 12:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r2, 3.2.5-r2
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /var/lib/redmine/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /var/lib/redmine/config/locales /var/lib/redmine/config/settings.yml"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet --keep-going"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 bash-completion berkdb bzip2 cli cracklib crypt cxx dri gdbm hardened iconv ipv6 justify mmx modules mudflap multilib ncurses nls nptl openmp pam pax_kernel pcre readline session sse sse2 ssl tcpd unicode urandom utf8 vim-syntax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling unique_id usertrack vhost_alias autoindex cgi perl proxy proxy_ajp" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


Ruby version:

Code:

#eselect ruby list
Available Ruby profiles:
  [1]   ruby18
  [2]   ruby19 (with Rubygems) *
  [3]   ruby20 (with Rubygems)


Installed ruby dependencies:

Code:

# qlist -ICv dev-ruby
dev-ruby/abstract-1.0.0-r1
dev-ruby/actionmailer-3.2.14
dev-ruby/actionpack-3.2.14
dev-ruby/activemodel-3.2.14
dev-ruby/activerecord-3.2.14
dev-ruby/activeresource-3.2.14
dev-ruby/activesupport-3.2.14
dev-ruby/arel-3.0.2-r1
dev-ruby/bcrypt-ruby-3.1.2
dev-ruby/builder-3.0.4
dev-ruby/builder-3.2.2
dev-ruby/bundler-1.3.5
dev-ruby/coderay-1.1.0
dev-ruby/coffee-rails-3.2.2
dev-ruby/coffee-script-2.2.0
dev-ruby/coffee-script-source-1.6.3
dev-ruby/erubis-2.7.0
dev-ruby/execjs-2.0.1
dev-ruby/ffi-1.4.0
dev-ruby/hike-1.2.3
dev-ruby/i18n-0.6.5
dev-ruby/journey-1.0.4
dev-ruby/jquery-rails-2.3.0
dev-ruby/json-1.8.0-r1
dev-ruby/listen-0.7.3
dev-ruby/mail-2.5.4
dev-ruby/mime-types-1.23
dev-ruby/multi_json-1.6.1
dev-ruby/pg-0.16.0
dev-ruby/polyglot-0.3.3
dev-ruby/racc-1.4.9
dev-ruby/rack-1.4.5-r1
dev-ruby/rack-cache-1.2
dev-ruby/rack-ssl-1.3.3
dev-ruby/rack-test-0.6.2
dev-ruby/rails-3.2.14
dev-ruby/railties-3.2.14
dev-ruby/rake-0.9.6
dev-ruby/rake-compiler-0.9.1
dev-ruby/rb-inotify-0.9.1
dev-ruby/rdoc-4.0.1-r1
dev-ruby/rmagick-2.13.2
dev-ruby/ruby-net-ldap-0.3.1
dev-ruby/rubygems-2.0.8
dev-ruby/sass-3.2.10
dev-ruby/sass-rails-3.2.6
dev-ruby/sprockets-2.2.2-r1
dev-ruby/thor-0.18.1
dev-ruby/tilt-1.4.1
dev-ruby/treetop-1.4.15
dev-ruby/tzinfo-1.0.1
dev-ruby/uglifier-2.2.1
dev-ruby/yard-0.8.7


(Because I'm kind of desperate I also posted this question here: http://stackoverflow.com/questions/18788866/redmine-on-gentoo-undefined-method-active-record-for-railsapplicationco , I will share any answers from so. with you so there's no need to downvote, thanks.)
_________________
BOFH Excuse #450:
Terrorists crashed an airplane into the server room, have to remove /bin/laden. (rm -rf /bin/laden)
Back to top
View user's profile Send private message
stan666
Apprentice
Apprentice


Joined: 25 Jun 2007
Posts: 165
Location: Germany

PostPosted: Mon Sep 16, 2013 3:56 pm    Post subject: Reply with quote

Holy cow I solved it myself! :D

It seems that the dependencies Gentoo pulls in are not valid.

I manually downloaded the Gemfile from

http://www.redmine.org/projects/redmine/repository/entry/tags/2.3.2/Gemfile

and ran

Code:
bundle install --without development test


After everything was installed

Code:
emerge --config "=www-apps/redmine-2.3.2"


ran flawlessly and Redmine came up after I restarted apache!

I think Gentoo should deliver the Gemfile and execute bundle during installation! :x
_________________
BOFH Excuse #450:
Terrorists crashed an airplane into the server room, have to remove /bin/laden. (rm -rf /bin/laden)


Last edited by stan666 on Mon Sep 16, 2013 3:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
SlashBeast
Retired Dev
Retired Dev


Joined: 23 May 2006
Posts: 2922

PostPosted: Mon Sep 16, 2013 3:58 pm    Post subject: Reply with quote

bundle as root will borke your system.

Anyway, RoR apps are special case and I would simple grab rvm script, install ruby user-wide, then use bundle and start redmine from there - redmine is super sensitive to any single version change of it deps, even the minor change, rvm way is system independent and working.
Back to top
View user's profile Send private message
stan666
Apprentice
Apprentice


Joined: 25 Jun 2007
Posts: 165
Location: Germany

PostPosted: Mon Sep 16, 2013 4:02 pm    Post subject: Reply with quote

Hi SlashBeast, thanks for your reply. Maybe I should not use Redmine from portage but do a manual install with a non-root user account instead.

I do not run any other ruby or rails application therefore I hope "bundle --install" did not destroy something :)
_________________
BOFH Excuse #450:
Terrorists crashed an airplane into the server room, have to remove /bin/laden. (rm -rf /bin/laden)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum