Project

General

Profile

Can't start redmine - uninitialized constant Arel::Relation

Added by Tomasz Muszyński almost 10 years ago

Hi everyone!
I have a problem with my redmine installations. I've just upgraded ruby on my debian and redmine finally stopped working. After hours of "applying fixes" to ruby installation and moving to rvm I'm stuck on problem show below. Please, help :)

I'm using redmine from 2.5-stable@13176.
I've installed ruby through rvm using this guide: http://martin-denizet.com/install-redmine-2-5-x-with-git-and-subversion-on-debian-with-apache2-rvm-and-passenger/

# ruby script/rails server webrick -e production
=> Booting WEBrick
=> Rails 3.2.18 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Storing outgoing emails configuration in config/email.yml is deprecated. You should now store it in config/configuration.yml using the email_delivery setting.
[2014-06-09 00:41:22] INFO  WEBrick 1.3.1
[2014-06-09 00:41:22] INFO  ruby 2.0.0 (2014-05-08) [x86_64-linux]
[2014-06-09 00:41:22] INFO  WEBrick::HTTPServer#start: pid=21533 port=3000
Started GET "/" for 95.49.xxx.xxx at 2014-06-09 00:41:24 +0200
Processing by WelcomeController#index as HTML
   (0.2ms)  SELECT MAX(`settings`.`updated_on`) AS max_id FROM `settings`
Completed 500 Internal Server Error in 8.8ms

NameError (uninitialized constant Arel::Relation):
  app/models/setting.rb:245:in `find_or_default'
  app/models/setting.rb:110:in `[]'
  app/models/setting.rb:143:in `autologin?'
  app/controllers/application_controller.rb:152:in `try_to_autologin'
  app/controllers/application_controller.rb:112:in `find_current_user'
  app/controllers/application_controller.rb:100:in `user_setup'

Currently i have installed following gems:

# gem list

*** LOCAL GEMS ***

actionmailer (3.2.18)
actionpack (3.2.18)
activemodel (3.2.18)
activerecord (3.2.18)
activeresource (3.2.18)
activesupport (3.2.18)
arel (4.0.2)
awesome_nested_set (2.1.6)
bigdecimal (1.2.0)
builder (3.0.0)
bundler (1.6.2)
bundler-unload (1.0.2)
coderay (1.1.0)
erubis (2.7.0)
executable-hooks (1.3.2)
gem-wrappers (1.2.4)
hike (1.2.3)
i18n (0.6.9)
io-console (0.4.2)
journey (1.0.4)
jquery-rails (2.0.3)
json (1.8.1, 1.7.7)
mail (2.5.4)
mime-types (1.25.1)
minitest (4.3.2)
multi_json (1.10.1)
mysql2 (0.3.16)
net-ldap (0.3.1)
polyglot (0.3.5)
psych (2.0.0)
rack (1.4.5)
rack-cache (1.2)
rack-openid (1.4.2)
rack-ssl (1.3.4)
rack-test (0.6.2)
rails (3.2.18)
railties (3.2.18)
rake (10.1.1, 0.9.6)
rdoc (4.1.1, 4.0.0)
redcarpet (2.3.0)
rmagick (2.13.2)
ruby-openid (2.3.0)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
sprockets (2.12.1)
test-unit (2.0.0.0)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (1.2.1)

Replies (3)

RE: Can't start redmine - uninitialized constant Arel::Relation - Added by Martin Denizet (redmine.org team member) almost 10 years ago

Hi Tomasz,
Arel is not used in Redmine. Instead it's Active Record being used (see source:/trunk/Gemfile)
I don't know what fixes you did but you may want to revert them if you modified the Redmine files.
Use svn status to check the integrity of your installation if you installed using subversion.
What do you get if you run which ruby ?
I suggest that you remove your Debian Ruby package to use exclusively RVM: apt-get remove ruby
After doing so, run a bundle install again.
Cheers,

RE: Can't start redmine - uninitialized constant Arel::Relation - Added by Tomasz Muszyński almost 10 years ago

Fixes was only a shorthand... i mean "trying to bring my installation working again", so no code was modified.

Anyway you pointed me to right direction. Uninstalling debian ruby didn't help, but after all I had to run `bundle update` instead of `bundle install` which did nothing. Anyway, the source of problem was that debian installed ruby 2.1 which is not compatible with redmine.

Second problem was that my apache stopped working with ruby directly and I had to install passenger (with help of your instructions).

Thanks for help!

    (1-3/3)