unexpected tINTEGER
SonIcco opened this issue · 1 comments
SonIcco commented
In my rails project i got the error shown below if i try to start the server or console. I never did anything with json on the project, need help to fix the problem.
*gems/multi_json-1.7.7/lib/multi_json.rb:1:in `require': gems/multi_json-1.7.7/lib/multi_json/options.rb:40: syntax error, unexpected tINTEGER, expecting keyword_end (SyntaxError) value.arity ?= 0 ? value[] : value[args]
application trace:
from gems/multi_json-1.7.7/lib/multi_json.rb:1:in `<top (required)>'
from gems/uglifier-2.1.1/lib/uglifier.rb:4:in `require'
from gems/uglifier-2.1.1/lib/uglifier.rb:4:in `<top (required)>'
from gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /var/www/dev/smt/config/application.rb:7:in `<top (required)>'
from gems/railties-3.2.3/lib/rails/commands.rb:53:in `require'
from gems/railties-3.2.3/lib/rails/commands.rb:53:in `block in <top (required)>'
from gems/railties-3.2.3/lib/rails/commands.rb:50:in `tap'
from gems/railties-3.2.3/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platform => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem 'therubyracer'
gem 'less-rails'
gem 'twitter-bootstrap-rails'
# User Management
gem 'cancan', '>= 1.6.9'
gem 'rolify', '>= 3.2.0'
gem 'devise', '>= 2.2.3'
# backend
gem 'activeadmin'
# Serach Engine
gem 'sunspot_rails'
gem 'sunspot_solr', :group => :development
gem 'passenger'
gem 'better_errors'
gem 'binding_of_caller'```
rwz commented
There is no such string in MultiJson.
The code that throws the error is supposed to be this:
value.arity == 0 ? value[] : value[*args]
and not this:
value.arity ?= 0 ? value[] : value[*args]
I recommend you to reinstall multi_json
gem