martin-denizet / redmine_login_audit

Redmine plugin to log successful login attempts in Redmine
44 stars 30 forks source link

error during installation on Redmine 3.1 with Ruby 1.9.3-p0 #21

Closed tofi86 closed 8 years ago

tofi86 commented 8 years ago

After installing gems with bundle install (and after patching the Gemfile with PR #20) I ran the migration and got this error:

# rake redmine:plugins:migrate RAILS_ENV=production
(in /var/www/projekte/redmine-3.1)
rake aborted!
SyntaxError: /var/lib/gems/1.9.1/gems/wice_grid-3.5.0/lib/wice/wice_grid_misc.rb:97: syntax error, unexpected tLABEL
      def value_for(key, strict: true) #:nodoc:
                                ^
/var/lib/gems/1.9.1/gems/wice_grid-3.5.0/lib/wice/wice_grid_misc.rb:131: syntax error, unexpected keyword_end, expecting $end
/var/lib/gems/1.9.1/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/var/lib/gems/1.9.1/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/var/lib/gems/1.9.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
/var/lib/gems/1.9.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/1.9.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/1.9.1/gems/wice_grid-3.5.0/lib/wice_grid.rb:1:in `<top (required)>'
/var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `require'
/var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `each'
/var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `block in require'
/var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `each'
/var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `require'
/var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler.rb:131:in `require'
/var/www/projekte/redmine-3.1/config/application.rb:5:in `<top (required)>'
/var/www/projekte/redmine-3.1/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)

This is my redmine environment:

Environment:
  Redmine version                3.1.3.stable.14958
  Ruby version                   1.9.3-p0 (2011-10-30) [x86_64-linux]
  Rails version                  4.2.5
  Environment                    production
  Database adapter               Mysql2
martin-denizet commented 8 years ago

I went to the extend of installing ruby 1.9.3-p0 to test for myself. I get the same error. I conclude that wice_grid 3.5.0 doesn't support ruby 1.9.3-p0. It may be working using the latest ruby of the 1.9 branch, I didn't test. However, note that the ruby 1.9 branch is not supported anymore since the 23rd of February 2015. I think also the wice_grid maintainers won't be interested in fixing compatibility with an unsupported ruby version.

For these reasons, I would advise you to update the the latest stable ruby. RVM is a great help to manage ruby versions easily: https://rvm.io/

Please tell me if you try the latest ruby of the 1.9 branch (1.9.3-p551 I believe) so I can update the plugin README accordingly.

Also, out of curiosity, how did you end up with ruby 1.9.3-p0? Using a package manager? On which distro?

Cheers,

tofi86 commented 8 years ago

You're right, Ruby 1.9.3 is pretty old. However, it's the latest version on Ubuntu 12.04 LTS which we're currently using on our redmine web server.

martin-denizet commented 8 years ago

I suggest you go with RVM not to be tied to distro packages (obviously that implies to uninstall the distro's Ruby package).

tofi86 commented 8 years ago

jup, I'm just in the middle of a migration from distro ruby to RVM ruby ;-)

tofi86 commented 8 years ago

Here we go:

Environment:
  Redmine version                3.1.3.stable.14976
  Ruby version                   2.2.1-p85 (2015-02-26) [x86_64-linux]
  Rails version                  4.2.5
  Environment                    production
  Database adapter               Mysql2

Will test the master branch with my patch #20 now...

tofi86 commented 8 years ago

perfect, works well now! :)

martin-denizet commented 8 years ago

Good to hear! Also I suspect that the patch would not have been required in this configuration. I'm still adding it for safety. Cheers!