Project

General

Profile

TypeError (Cannot visit Integer)

Added by Uttam Sapkota over 4 years ago

I am trying to use redmine but getting following error.

My Configurations:

Ruby: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]

gem: 2.7.6

Result of RAILS_ENV=development script/about

Environment:
Redmine version 2.0.4.stable.10774
Ruby version 2.5.1 (x86_64-linux)
Rails version 3.2.6
Environment development
Database adapter Mysql2
Redmine plugins:
no plugin installed

  • LOCAL GEMS ***

actioncable (5.2.4, 5.2.0)
actionmailer (5.2.4, 5.2.0, 3.2.6)
actionpack (5.2.4, 5.2.0, 3.2.6)
actionpack-xml_parser (2.0.1)
actionview (5.2.4, 5.2.0)
activejob (5.2.4, 5.2.0)
activemodel (5.2.4, 5.2.0, 3.2.6)
activerecord (5.2.4, 5.2.0, 3.2.6)
activeresource (3.2.6)
activestorage (5.2.4, 5.2.0)
activesupport (5.2.4, 5.2.0, 3.2.6)
addressable (2.7.0)
arel (9.0.0, 3.0.3)
bigdecimal (default: 1.3.4)
builder (3.2.4, 3.2.3, 3.0.0)
bundler (1.17.3)
cmath (default: 1.0.0)
coderay (1.0.9)
concurrent-ruby (1.1.5)
crass (1.0.5)
css_parser (1.7.1)
csv (3.1.2, 3.0.9, default: 1.0.0)
date (default: 1.0.0)
did_you_mean (1.2.0)
erubi (1.9.0)
erubis (2.7.0)
etc (default: 1.0.0)
fcntl (default: 1.0.0)
fiddle (default: 1.0.0)
fileutils (default: 1.0.2)
gdbm (default: 2.0.0)
globalid (0.4.2)
hike (1.2.3)
htmlentities (4.3.4)
i18n (1.6.0, 0.7.0, 0.6.11)
iconv (1.0.5, 1.0.3)
io-console (default: 0.4.6)
ipaddr (default: 1.2.0)
journey (1.0.4)
json (default: 2.1.0, 1.8.6)
loofah (2.4.0)
mail (2.7.1, 2.4.4)
marcel (0.3.3)
metaclass (0.0.4)
method_source (0.9.2)
mime-types (1.25.1)
mimemagic (0.3.3)
mini_magick (4.9.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.13.0, 5.10.3)
mocha (0.12.3)
multi_json (1.14.1)
mysql2 (0.5.3, 0.3.21)
net-ldap (0.16.2, 0.3.1)
net-telnet (0.1.1)
nio4r (2.5.2)
nokogiri (1.10.7)
openssl (default: 2.1.0)
polyglot (0.3.5)
power_assert (1.1.5, 1.1.1)
prototype-rails (3.2.1)
psych (default: 3.0.2)
public_suffix (4.0.1)
rack (2.0.7, 1.4.7)
rack-cache (1.10.0, 1.2)
rack-openid (1.4.2)
rack-ssl (1.3.4)
rack-test (1.1.0, 0.6.3)
rails (5.2.4, 5.2.0, 3.2.6)
rails-dom-testing (2.0.3)
rails-html-sanitizer (1.3.0)
railties (5.2.4, 5.2.0, 3.2.6)
rake (13.0.1, 12.3.0, 0.8.7)
rbpdf (1.20.1, 1.19.8)
rbpdf-font (1.19.1)
rdoc (default: 6.0.1, 3.12.2)
redcarpet (3.5.0, 3.4.0)
request_store (1.0.5)
roadie (3.5.1)
roadie-rails (2.1.0, 1.3.0)
rouge (3.13.0, 3.3.0)
ruby-openid (2.9.2, 2.1.8)
scanf (default: 1.0.0)
sdbm (default: 1.0.0)
shoulda (2.11.3)
sprockets (4.0.0, 3.7.2, 2.1.4)
sprockets-rails (3.2.1)
stringio (default: 0.0.1)
strscan (default: 1.0.0)
test-unit (3.3.4, 3.2.7)
thor (0.20.3)
thread_safe (0.3.6)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (1.2.5, 0.3.56)
webrick (default: 1.4.2)
websocket-driver (0.7.1)
websocket-extensions (0.1.4)
xmlrpc (0.3.0)
yard (0.9.20)
zlib (default: 1.0.0)

ERROR

[2019-12-12 14:05:26] INFO WEBrick::HTTPServer#start: pid=23409 port=3000
/home/utsapkota/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-3.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:267: warning: constant ::Fixnum is deprecated

Started GET "/" for 127.0.0.1 at 2019-12-12 14:05:40 +0545
Processing by MyController#page as HTML
(248.5ms) SELECT MAX AS max_id FROM `settings`
Completed 500 Internal Server Error in 1048ms

TypeError (Cannot visit Integer):
app/models/setting.rb:171:in `find_or_default'
app/models/setting.rb:108:in `[]'
app/models/setting.rb:141:in `rest_api_enabled?'
app/controllers/application_controller.rb:68:in `find_current_user'
app/controllers/application_controller.rb:51:in `user_setup'

^C[2019-12-12 14:06:04] INFO going to shutdown ...
[2019-12-12 14:06:04] INFO WEBrick::HTTPServer#start done.
Exiting


Replies (1)

RE: TypeError (Cannot visit Integer) - Added by Go MAEDA over 4 years ago

Redmine 2.0.4 is too old. Please use the latest version.

Since the Redmine is too old, it does not support Ruby 2.5.

    (1-1/1)