Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8327615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:10:23+00:00 2026-06-09T01:10:23+00:00

I want to use Metrical with my brand-new Rails project using Ruby 1.9 hash

  • 0

I want to use Metrical with my brand-new Rails project using Ruby 1.9 hash syntax doing things like

  before_filter :guest_user,     only: [:new, :create]
  before_filter :correct_user,   only: :destroy

and I get this error:

/Users/xxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/racc/parser.rb:351:in `on_error':  (Racc::ParseError)
parse error on value ":" (tCOLON)

I did a bit of investigation and found out that the ruby_parser gem does not support 1.9 hash syntax (see github issue) – not knowing which version that refers to I’ve tried to update the ruby_parser gem to 2.3.1 which doesn’t work because some of the code quality tools included in metrical require 2.0 versions of ruby_parser.

Is there any way to solve this (besides rolling back to the old syntax)? I’m also a bit puzzled because a couple of the code quality tools seem rather outdated, checking on RubyToolBox confirmed this impression. Or am I missing something fundamental here?

(Here’s my Gemfile.lock for reference):

    GEM
      remote: https://rubygems.org/
      specs:
        Saikuro (1.1.0)
        actionmailer (3.2.6)
          actionpack (= 3.2.6)
          mail (~> 2.4.4)
        actionpack (3.2.6)
          activemodel (= 3.2.6)
          activesupport (= 3.2.6)
          builder (~> 3.0.0)
          erubis (~> 2.7.0)
          journey (~> 1.0.1)
          rack (~> 1.4.0)
          rack-cache (~> 1.2)
          rack-test (~> 0.6.1)
          sprockets (~> 2.1.3)
        activemodel (3.2.6)
          activesupport (= 3.2.6)
          builder (~> 3.0.0)
        activerecord (3.2.6)
          activemodel (= 3.2.6)
          activesupport (= 3.2.6)
          arel (~> 3.0.2)
          tzinfo (~> 0.3.29)
        activeresource (3.2.6)
          activemodel (= 3.2.6)
          activesupport (= 3.2.6)
        activesupport (3.2.6)
          i18n (~> 0.6)
          multi_json (~> 1.0)
        addressable (2.2.8)
        arel (3.0.2)
        arrayfields (4.7.4)
        awesome_print (1.0.2)
        bcrypt-ruby (3.0.1)
        bootstrap-sass (2.0.4.0)
        bootstrap-will_paginate (0.0.7)
          will_paginate
        builder (3.0.0)
        capybara (1.1.2)
          mime-types (>= 1.16)
          nokogiri (>= 1.3.3)
          rack (>= 1.0.0)
          rack-test (>= 0.5.4)
          selenium-webdriver (~> 2.0)
          xpath (~> 0.1.4)
        childprocess (0.3.4)
          ffi (~> 1.0, >= 1.0.6)
        chronic (0.3.0)
        churn (0.0.13)
          chronic (>= 0.2.3)
          hirb
          json_pure
          main
          ruby_parser (~> 2.0.4)
          sexp_processor (~> 3.0.3)
        coffee-rails (3.2.2)
          coffee-script (>= 2.2.0)
          railties (~> 3.2.0)
        coffee-script (2.2.0)
          coffee-script-source
          execjs
        coffee-script-source (1.3.3)
        colored (1.2)
        cucumber (1.2.1)
          builder (>= 2.1.2)
          diff-lcs (>= 1.1.3)
          gherkin (~> 2.11.0)
          json (>= 1.4.6)
        cucumber-rails (1.3.0)
          capybara (>= 1.1.2)
          cucumber (>= 1.1.8)
          nokogiri (>= 1.5.0)
        database_cleaner (0.7.2)
        diff-lcs (1.1.3)
        erubis (2.7.0)
        execjs (1.4.0)
          multi_json (~> 1.0)
        factory_girl (3.5.0)
          activesupport (>= 3.0.0)
        factory_girl_rails (3.5.0)
          factory_girl (~> 3.5.0)
          railties (>= 3.0.0)
        faker (1.0.1)
          i18n (~> 0.4)
        fattr (2.2.1)
        ffi (1.1.0)
        flay (1.4.3)
          ruby_parser (~> 2.0)
          sexp_processor (~> 3.0)
        flog (2.5.3)
          ruby_parser (~> 2.0)
          sexp_processor (~> 3.0)
        gherkin (2.11.1)
          json (>= 1.4.6)
        growl (1.0.3)
        guard (1.2.3)
          listen (>= 0.4.2)
          thor (>= 0.14.6)
        guard-rspec (1.2.0)
          guard (>= 1.1)
        guard-spork (1.1.0)
          guard (>= 1.1)
          spork (>= 0.8.4)
        hike (1.2.1)
        hirb (0.7.0)
        i18n (0.6.0)
        journey (1.0.4)
        jquery-rails (2.0.2)
          railties (>= 3.2.0, < 5.0)
          thor (~> 0.14)
        json (1.7.3)
        json_pure (1.7.3)
        launchy (2.1.0)
          addressable (~> 2.2.6)
        libwebsocket (0.1.4)
          addressable
        listen (0.4.7)
          rb-fchange (~> 0.0.5)
          rb-fsevent (~> 0.9.1)
          rb-inotify (~> 0.8.8)
        mail (2.4.4)
          i18n (>= 0.4.0)
          mime-types (~> 1.16)
          treetop (~> 1.4.8)
        main (4.7.1)
        map (6.2.0)
        metric_fu (2.1.1)
          Saikuro (>= 1.1.0)
          activesupport (>= 2.0.0)
          chronic (~> 0.3.0)
          churn (>= 0.0.7)
          flay (>= 1.2.1)
          flog (>= 2.3.0)
          rails_best_practices (>= 0.6.4)
          rcov (>= 0.8.3.3)
          reek (>= 1.2.6)
          roodi (>= 2.1.0)
          syntax
        metrical (0.1.0)
          metric_fu (~> 2.1.1)
          rcov (~> 0.9)
        mime-types (1.19)
        multi_json (1.3.6)
        nokogiri (1.5.5)
        pg (0.14.0)
        polyglot (0.3.3)
        progressbar (0.11.0)
        rack (1.4.1)
        rack-cache (1.2)
          rack (>= 0.4)
        rack-ssl (1.3.2)
          rack
        rack-test (0.6.1)
          rack (>= 1.0)
        rails (3.2.6)
          actionmailer (= 3.2.6)
          actionpack (= 3.2.6)
          activerecord (= 3.2.6)
          activeresource (= 3.2.6)
          activesupport (= 3.2.6)
          bundler (~> 1.0)
          railties (= 3.2.6)
        rails_best_practices (1.10.1)
          activesupport
          awesome_print
          colored
          erubis
          i18n
          progressbar
          sexp_processor
        railties (3.2.6)
          actionpack (= 3.2.6)
          activesupport (= 3.2.6)
          rack-ssl (~> 1.3.2)
          rake (>= 0.8.7)
          rdoc (~> 3.4)
          thor (>= 0.14.6, < 2.0)
        rake (0.9.2.2)
        rb-fchange (0.0.5)
          ffi
        rb-fsevent (0.9.1)
        rb-inotify (0.8.8)
          ffi (>= 0.5.0)
        rcov (0.9.11)
        rdoc (3.12)
          json (~> 1.4)
        reek (1.2.12)
          ripper_ruby_parser (~> 0.0.7)
          ruby2ruby (~> 1.2.5)
          ruby_parser (~> 2.0)
          sexp_processor (~> 3.0)
        ripper_ruby_parser (0.0.8)
          sexp_processor (~> 3.0)
        roodi (2.1.0)
          ruby_parser
        rspec (2.11.0)
          rspec-core (~> 2.11.0)
          rspec-expectations (~> 2.11.0)
          rspec-mocks (~> 2.11.0)
        rspec-core (2.11.1)
        rspec-expectations (2.11.1)
          diff-lcs (~> 1.1.3)
        rspec-mocks (2.11.1)
        rspec-rails (2.11.0)
          actionpack (>= 3.0)
          activesupport (>= 3.0)
          railties (>= 3.0)
          rspec (~> 2.11.0)
        ruby2ruby (1.2.5)
          ruby_parser (~> 2.0)
          sexp_processor (~> 3.0)
        ruby_parser (2.0.6)
          sexp_processor (~> 3.0)
        rubyzip (0.9.9)
        sass (3.1.20)
        sass-rails (3.2.5)
          railties (~> 3.2.0)
          sass (>= 3.1.10)
          tilt (~> 1.3)
        selenium-webdriver (2.25.0)
          childprocess (>= 0.2.5)
          libwebsocket (~> 0.1.3)
          multi_json (~> 1.0)
          rubyzip
        sexp_processor (3.0.10)
        simplecov (0.6.4)
          multi_json (~> 1.0)
          simplecov-html (~> 0.5.3)
        simplecov-html (0.5.3)
        spork (0.9.2)
        sprockets (2.1.3)
          hike (~> 1.2)
          rack (~> 1.0)
          tilt (~> 1.1, != 1.3.0)
        sqlite3 (1.3.6)
        syntax (1.0.0)
        thor (0.15.4)
        tilt (1.3.3)
        treetop (1.4.10)
          polyglot
          polyglot (>= 0.3.1)
        tzinfo (0.3.33)
        uglifier (1.2.6)
          execjs (>= 0.3.0)
          multi_json (~> 1.3)
        will_paginate (3.0.3)
        xpath (0.1.4)
          nokogiri (~> 1.3)

    PLATFORMS
      ruby

    DEPENDENCIES
      arrayfields
      bcrypt-ruby
      bootstrap-sass
      bootstrap-will_paginate
      capybara
      coffee-rails
      cucumber-rails
      database_cleaner
      factory_girl_rails
      faker
      fattr
      growl
      guard-rspec
      guard-spork
      jquery-rails
      launchy
      map
      metrical
      pg
      rails (= 3.2.6)
      rb-fsevent
      rspec-rails
      sass-rails
      simplecov
      spork
      sqlite3
      uglifier
      will_paginate
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T01:10:26+00:00Added an answer on June 9, 2026 at 1:10 am

    After doing some more research on this issue and under the impression that ruby_parser wouldn’t be updated for a while (watching https://github.com/seattlerb/ruby_parser though) I’ve decided to finally go for the nasty hack to replace my ruby hashes with the old syntax. I wrote a rake task for that such that it’s easy to replace them all in one run, run metrical and then revert them back to their nice 1.9 hash syntax.

    https://github.com/bkleinen/hash-reverter

    Update: apparently, ruby_parser will be updated with version 3.0.0, but most of the tools depend on older versions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using jruby, i want use pagination for my rails app i used
I want use this 1 for using Bar code or QR code scanner. I
I want use BYTE_ORDER macro in my Xcode project but i can't because i
I want use jQuery in my project. I know the javascript_include_tag calls the jQuery
I want use on my rails helper a script as follow: select_tag(:article_id, option_groups_from_collection_for_select( @article,
Where are the Gnulib files in Linux? I want use lib like safe-read, mbchar,
I want use a query like such SELECT personId FROM Person p Inner Join
I want use ajax.net to do some js. like below: ScriptManager.RegisterStartupScript(Submit, typeof(Button), alert, location.href='test.aspx';,
I want use html5's new tag to play a wav file (currently only supported
i want use XmlSampleGenerator API in my project. i don't know how to add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.