Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Pcushing opened this issue Oct 20, 2017 · 1 comment

Comments

@Pcushing
Copy link

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.

@nickcharlton
Copy link
Member

nickcharlton commented Nov 23, 2017

Hi @Pcushing!

Thanks for reporting this. We state that we support Rails 4.1 and above, so that should mean we support Ruby 2.1.6.

But, we'd not been testing Ruby versions as CircleCI didn't support a form of build matrices. It can do this now with Circle CI 2.0.

If you'd be willing to take a look at a solution to this with Ruby 2.1.6 that'd be great! In the meantime, I'm going to look into testing against different Ruby versions.

nickcharlton added a commit that referenced this issue Nov 24, 2017
A recent issue (#1010) highlighted an deprecation under certain Ruby
versions that we should be aware of. So far, we've been using CircleCI
for running tests and previously they didn't support multiple builds.

With 2.0, Workflows allows for something like this to be setup. This
uses YAML inheritance to share a job definition across multiple build
types (defined as different Docker configurations).

This introduces Ruby 2.3 in addition to 2.4.1.
nickcharlton added a commit that referenced this issue Dec 2, 2017
A recent issue (#1010) highlighted a deprecation under certain Ruby
versions that we should be aware of. So far, we've been using CircleCI
for running tests and previously they didn't support multiple builds.

With Circle CI 2.0, Workflows allows for something like this to be setup. This
uses YAML inheritance to share a job definition across multiple build
types (defined as different Docker configurations).

This introduces Ruby 2.3 in addition to 2.4.1 and using Postgres 9.6.

Notable caveat to this approach is that you must set different databases
for each environment (here named like the Ruby versions) to avoid test
state-based errors.
nickcharlton added a commit that referenced this issue Jan 26, 2018
A recent issue (#1010) highlighted a deprecation under certain Ruby
versions that we should be aware of. So far, we've been using CircleCI
for running tests and previously they didn't support multiple builds.

With Circle CI 2.0, Workflows allows for something like this to be setup. This
uses YAML inheritance to share a job definition across multiple build
types (defined as different Docker configurations).

This introduces Ruby 2.3 in addition to 2.4.1 and using Postgres 9.6.

Notable caveat to this approach is that you must set different databases
for each environment (here named like the Ruby versions) to avoid test
state-based errors.
nickcharlton added a commit that referenced this issue Jan 26, 2018
A recent issue (#1010) highlighted a deprecation under certain Ruby
versions that we should be aware of. So far, we've been using CircleCI
for running tests and previously they didn't support multiple builds.

With Circle CI 2.0, Workflows allows for something like this to be setup. This
uses YAML inheritance to share a job definition across multiple build
types (defined as different Docker configurations).

This introduces Ruby 2.3 and 2.4.3 in addition to 2.5.0 and using Postgres 9.5.

Notable caveat to this approach is that you must set different databases
for each environment (here named like the Ruby versions) to avoid test
state-based errors.
nickcharlton added a commit that referenced this issue Jan 26, 2018
A recent issue (#1010) highlighted a deprecation under certain Ruby
versions that we should be aware of. So far, we've been using CircleCI
for running tests and previously they didn't support multiple builds.

With Circle CI 2.0, Workflows allows for something like this to be setup. This
uses YAML inheritance to share a job definition across multiple build
types (defined as different Docker configurations).

This introduces Ruby 2.3 and 2.4.3 in addition to 2.5.0 and using Postgres 9.5.

Notable caveat to this approach is that you must set different databases
for each environment (here named like the Ruby versions) to avoid test
state-based errors.
nickcharlton added a commit that referenced this issue Jan 26, 2018
nickcharlton added a commit that referenced this issue Jan 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants