aws-s3 gem unless defined? ##{:instance_writer=>true} - ruby-on-rails

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.

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.

Related

Add Hotwire to existing Rails 6.1 app using sprockets

I'm trying to upgrade an existing Rails 6.1 with sprockets app to use stimulus. I installed
gem 'importmap-rails'
gem 'hotwire-rails'
The javascript_importmap_tags causes this error in Firefox Developer Tools:
Uncaught TypeError: Error resolving module specifier “application”. Relative module specifiers must start with “./”, “../” or “/”.
Should this work alongside sprockets?
I have importmap-rails (0.7.6), stimulus-rails (0.4.2)
Error can be safely ignored I believe.
Update: I can confirm that this error can safely be ignored, it doesn't cause any issues. Obviously this is not the ideal "solution", hence the downvote I guess, so if anyone knows a better answer and posts it that will be great and I will mark it as the accepted answer.

Issue adding Bootstrap on Ruby on Rails Project

This is what I followed in order to get started with bootstrap on Ruby on Rails.
I followed every step exactly the same. However, I keep running into the same error for some reason. When I do not do any thing (i.e. do not use bootstrap) everything works (but the application looks trashy).
Whenever I use bootstrap, I get:
invalid regexp character
This is the application trace:
(execjs):24299
app/views/layouts/application.html.erb:8:in `_app_views_layouts_application_html_erb__337612969_59863020'
I have no clue what is happening.
P.S. I am a beginner. So if the solution is simple then, yeah...
remove #gem 'duktape' from gem file..the issue will be solved

Rails 3.2: Undefined method 'class_inheritable_accessor' in activemerchant

I'm building my first Rails app and trying to integrate active_paypal_adaptive_payment with Rails 3.2.1, however when I try to boot up the rails server it runs into the problem of, "undefined method 'class_inheritable_accessor' (in line 4 of post_date.rb) in the activemerchant-1.5.1 gem of which is a dependency.
I've looked around and seems this method has been removed in rails 3.2. From what I understand, it's not as simple as going into the activemerchant gem and replacing class_inheritable_accessor with class_attribute (read this conversation).
Any ideas on how I could update this gem so it could be compatible with Rails 3.2? It's an outstanding issue on the github page so appreciate any help with it!
This particular commit solved my issue: https://github.com/cmezak/active_paypal_adaptive_payment/commit/c6661704c45b73a0be5c608c673b106ac1eb5b69

Rails 2.3.8 tiny mce issue - undefined method `uses_tiny_mce'

I am facing an issue in my application with tiny mce.
All the gem version & ruby version is OK on my system, but it is giving me error
= undefined method `uses_tiny_mce'
Here i installed the tiny_mce gem. COnfigured it correctely, but still there is an issue.
Please help.
Did you include
config.gem 'tiny_mce'
in config/environment.rb?
I have used this gem in the past too, but have stopped using it. I figured it complicated the setup and deployment of my Rails apps. Since then I have just used the TinyMCE editor by itself. Since it is 100% javascript, it does not touch any Ruby code which keeps things better organized.
I was not using this as a plugin.
I have followed the steps given in the,
http://enginey.googlecode.com/svn/trunk/vendor/plugins/tiny_mce/README.rdoc
Steps :
script/plugin install git://github.com/kete/tiny_mce.git
rake tiny_mce:install
my issue got resolved.

I18n gem update causing error message crazyness in rails 2.3.8

This question is already here:
Why doesn't Rails' "errors.full_messages" replace attribute and message variables?
... but it hasn't been answered yet and I am sure it's because of the gem I18n -version "0.5.0".
This error suddenly appeared for me and I'm just assuming it is because heroku is now using the latest gem version.
How can I get the whole application to use the previous version '0.4.1' or fix how the error messages without having to change the .yml or if I have to how would I setup the en.yml.
This is what is happening:
All error messages are now appearing like this with {{attribute}} {{message}} instead of the default which I would rather have.
See my answer to original question, Why doesn't Rails' "errors.full_messages" replace attribute and message variables?

Resources