Project

General

Profile

Does redmine 4.0 require rails 5.2.2?

Added by aus ghostdog about 5 years ago

Hi all,
I have been able to get Redmine 4.0 working fine, but unfortunately, a large number of plugins no longer work due to Rails 5.0 deprecating a number of items such as Alias_method_chain. I tried changing the rails version in Gemfile to use 4.2.10 the process goes fine until I try and run the bundle exec rake generate_secret_token

brisredmine@brisredmine-virtual-machine:/opt/redmine/current$ bundle exec rake generate_secret_token --trace
rake aborted!
NoMethodError: undefined method `represent_boolean_as_integer=' for nil:NilClass
/opt/redmine/current/config/application.rb:51:in `<class:Application>'
/opt/redmine/current/config/application.rb:8:in `<module:RedmineApp>'
/opt/redmine/current/config/application.rb:7:in `<top (required)>'
/opt/redmine/current/Rakefile:5:in `require'
/opt/redmine/current/Rakefile:5:in `<top (required)>'
/home/brisredmine/.rvm/gems/ruby-2.4.5/gems/rake-12.3.2/lib/rake/rake_module.rb:29:in `load'
/home/brisredmine/.rvm/gems/ruby-2.4.5/gems/rake-12.3.2/lib/rake/rake_module.rb:29:in `load_rakefile'
/home/brisredmine/.rvm/gems/ruby-2.4.5/gems/rake-12.3.2/lib/rake/application.rb:703:in `raw_load_rakefile'
/home/brisredmine/.rvm/gems/ruby-2.4.5/gems/rake-12.3.2/lib/rake/application.rb:104:in `block in load_rakefile'
/home/brisredmine/.rvm/gems/ruby-2.4.5/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
/home/brisredmine/.rvm/gems/ruby-2.4.5/gems/rake-12.3.2/lib/rake/application.rb:103:in `load_rakefile'
/home/brisredmine/.rvm/gems/ruby-2.4.5/gems/rake-12.3.2/lib/rake/application.rb:82:in `block in run'
/home/brisredmine/.rvm/gems/ruby-2.4.5/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
/home/brisredmine/.rvm/gems/ruby-2.4.5/gems/rake-12.3.2/lib/rake/application.rb:80:in `run'
/home/brisredmine/.rvm/gems/ruby-2.4.5/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/home/brisredmine/.rvm/gems/ruby-2.4.5/bin/rake:23:in `load'
/home/brisredmine/.rvm/gems/ruby-2.4.5/bin/rake:23:in `<main>'
/home/brisredmine/.rvm/gems/ruby-2.4.5/bin/ruby_executable_hooks:15:in `eval'
/home/brisredmine/.rvm/gems/ruby-2.4.5/bin/ruby_executable_hooks:15:in `<main>'

Looking in the application.rb file there is on line 7,8 and 51
module RedmineApp
class Application < Rails::Application

  1. Since Redmine 4.0, boolean values are stored in sqlite3 databases as 1 and 0
    config.active_record.sqlite3.represent_boolean_as_integer = true

I gather the issue is related to to this change alone
config.active_record.sqlite3.represent_boolean_as_integer = true

Is there a change that can be made to work with older rails versions?


Replies (3)

RE: Does redmine 4.0 require rails 5.2.2? - Added by Marius BĂLTEANU about 5 years ago

No, you cannot make Redmine 4.0 to work with older rails versions only with a change. My recommendation is to wait for the plugins to release compatible versions with Redmine 4.0 or to contribute to that plugins with fixes for the new Redmine version.

RE: Does redmine 4.0 require rails 5.2.2? - Added by Go MAEDA about 5 years ago

It is impossible to use Redmine 4.0 with Rails 4.2. Considerable portions of existing code have been rewritten for Rails 5.2 and some new features are depends on Rails 5.2.

RE: Does redmine 4.0 require rails 5.2.2? - Added by aus ghostdog about 5 years ago

Thanks for the information.

    (1-3/3)