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.