Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A administrate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • thoughtbot, inc.
  • administrate
  • Issues
  • #1010
Closed
Open
Issue created Oct 20, 2017 by Administrator@rootContributor

Ruby version 2.1.6 throws SyntaxError from lib/administrate/field/has_one.rb:21

Created by: Pcushing

I was just installing administrate on a brand new app and my first launch of the dashboard threw this:

SyntaxError in Admin::UsersController#index
/Users/patrickcushing/.rvm/gems/ruby-2.1.6/gems/administrate-0.8.1/lib/administrate/field/has_one.rb:21: syntax error, unexpected ':', expecting => { "#{attr}_attributes": related_dashboard_attributes } ^ /Users/patrickcushing/.rvm/gems/ruby-2.1.6/gems/administrate-0.8.1/lib/administrate/field/has_one.rb:27: syntax error, unexpected end-of-input, expecting keyword_end

Here's the line in question: https://github.com/thoughtbot/administrate/blob/master/lib/administrate/field/has_one.rb#L21

Swiching over to ruby 2.2.2 seemed to resolve the issue. I don't see anything specific to ruby versions in the README so I figured I'd report. A simple mention there would be helpful. I'm not in the position to propose a more robust fix this moment, but can take a look next week if desired.

Assignee
Assign to
Time tracking