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 6824481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:54:24+00:00 2026-05-26T21:54:24+00:00

So I have code that runs just fine on ruby 1.8.7, but on 1.9.2

  • 0

So I have code that runs just fine on ruby 1.8.7, but on 1.9.2 it doesn’t work.

Here’s the error message:

rake aborted!
/u/apps/proxy/releases/20111115125519/db/seeds.rb:16: syntax error, unexpected tASSOC, expecting ')'
  :image_url => 'dooropen',
           ^
/u/apps/proxy/releases/20111115125519/db/seeds.rb:16: syntax error, unexpected ',', expecting $end

Here’s the relevant part of the code:

door_on_state = BoxStateConfiguration.create (
  :image_url => 'dooropen',
  :color => '#CD493B',
  :label => 'Ytterdörr öppen',
  :interactive => false
)

I added # encoding: utf-8 to the top of the file, since that’s sometimes the problem when it runs on 1.8.7, but not 1.9.2, but that didn’t change anything.

Does anyone know what ruby is complaining about?

  • 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-05-26T21:54:24+00:00Added an answer on May 26, 2026 at 9:54 pm

    Have you tried removing the space between create and (? If Ruby doesn’t realize that you want to call a method, you can’t leave off the {}, since that’s reserved for handling a hash as last argument in a method.

    >> def foo(h) ; end #=> nil
    >> foo (:foo => "bar")
    SyntaxError: (irb):2: syntax error, unexpected tASSOC, expecting ')'
    foo (:foo => "bar")
                ^
    (irb):2: syntax error, unexpected ')', expecting $end
        [snip]
    >> foo(:foo => "bar") #=> nil
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some fairly old code that runs just fine in Excel versions before
I have some code that compiles and runs on MSVC++ but will not compile
below i have a code that runs in most of my simple programs ..
I have a simple jQuery code that runs on a web page that has
I have the following SQL code that runs against a Change Request database. Each
I have to call some code in a SharePoint site that runs under the
I have code that looks like the following, which works fine for displaying the
I have an ASP MVC3 application that runs fine (in VS 2010 debug) in
We code in C# using VS2008 SP1. We have a server that runs Team
I've got a threaded invoke call that never returns. The thread runs just fine

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.