Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syntax error, unexpected tLABEL #289

Open
KarenArzumanyan opened this issue Apr 6, 2016 · 1 comment
Open

syntax error, unexpected tLABEL #289

KarenArzumanyan opened this issue Apr 6, 2016 · 1 comment

Comments

@KarenArzumanyan
Copy link

After update plugin redmine_login_audit to latest version from git.

Information about my system:

Environment:
Redmine version 3.0.1.stable
Ruby version 1.9.3-p484 (2013-11-22) [x86_64-linux]
Rails version 4.2.0
Environment production
Database adapter Mysql2

akr@svn-server:/usr/share/redmine/plugins$ uname -a
Linux svn-server 3.13.0-85-generic #129-Ubuntu SMP Thu Mar 17 20:50:15 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

akr@svn-server:/usr/share/redmine/plugins$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.4 LTS
Release:        14.04
Codename:       trusty

akr@svn-server:/usr/share/redmine/plugins$ ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

When try migrate for plugin, get this error:

akr@svn-server:/usr/share/redmine/plugins$ sudo rake redmine:plugins:migrate RAILS_ENV=production
(in /usr/share/redmine)
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.0/lib/active_support/dependencies.rb:274:in `block in require'
/var/lib/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/1.9.1/gems/activesupport-4.2.0/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.7.4/lib/bundler/runtime.rb:76:in `require'
/var/lib/gems/1.9.1/gems/bundler-1.7.4/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/var/lib/gems/1.9.1/gems/bundler-1.7.4/lib/bundler/runtime.rb:72:in `each'
/var/lib/gems/1.9.1/gems/bundler-1.7.4/lib/bundler/runtime.rb:72:in `block in require'
/var/lib/gems/1.9.1/gems/bundler-1.7.4/lib/bundler/runtime.rb:61:in `each'
/var/lib/gems/1.9.1/gems/bundler-1.7.4/lib/bundler/runtime.rb:61:in `require'
/var/lib/gems/1.9.1/gems/bundler-1.7.4/lib/bundler.rb:133:in `require'
/usr/share/redmine/config/application.rb:5:in `<top (required)>'
/usr/share/redmine/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)

I changed "(key, strict: true)" code to this "(key, strict = true)".

akr@svn-server:/usr/share/redmine/plugins$ sudo mcedit /var/lib/gems/1.9.1/gems/wice_grid-3.5.0/lib/wice/wice_grid_misc.rb

I'm not an expert in Ruby. Maybe this is wrong. But migration is performed without error.

akr@svn-server:/usr/share/redmine/plugins$ sudo rake redmine:plugins:migrate RAILS_ENV=production
(in /usr/share/redmine)
Migrating redmine_base_deface (Redmine Base Deface plugin)...
Migrating redmine_lightbox2 (Redmine Lightbox 2)...
Migrating redmine_login_audit (Redmine Login Audit plugin)...
Migrating redmine_maintenance_mode (Redmine Maintenance Mode)...
@leikind
Copy link
Owner

leikind commented Apr 6, 2016

Ruby 1.9.1 is very very very ancient, you should upgrade to at least 2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants