aws-s3 gem unless defined? @@{:instance_writer=>true}
Asked Answered
S

1

10

I am trying to integrate the aws-s3 gem with the latest version of Rails (4.1.0), and when starting the server I receive this error:

aws-s3-0.6.3/lib/aws/s3/extensions.rb:223:in `class_eval': ///.rvm/gems/ruby-1.9.3-p385/gems/aws-s3-0.6.3/lib/aws/s3/extensions.rb:223: syntax error, unexpected $undefined (SyntaxError) unless defined? @@{:instance_writer=>true}

Has anyone got any ideas?

The bulk of the gem has not been updated for over two years so I am thinking that it may finally be out of date.

Stimulative answered 7/8, 2014 at 20:52 Comment(0)
K
8

In Rails 4.1 the bug is happening because cattr_attribute was removed from Module.

A short look at the issues in github: they say that the project has been abandoned.

This pull request was to fix the issue: https://github.com/marcel/aws-s3/pull/95

You may want to use one of forks like https://github.com/bartoszkopinski/aws-s3, that fixes the issue, or change the gem to the https://github.com/aws/aws-sdk-ruby.

Kulp answered 16/9, 2014 at 21:30 Comment(1)
The repo you linked to is missing a couple important looking commits from the original repo. I've combined the commits from the two here: github.com/nrowegt/aws-s3 so you get a couple fixes as well as Rails 4.1.Pointblank

© 2022 - 2024 — McMap. All rights reserved.