Closed giugrilli closed 7 years ago
Cloudinary currently doesn’t support Rails 5. The warning you get is a deprecation warning - for now it doesn’t require any change in code - yours or Cloudinary's. Stay tuned for our future releases and our Rails 5 support.
@roeeba Is rails 5 supported now? I seem to be able to use the backend upload + carrierwave integration just fine, but the direct upload via the jquery plugin isn't working. I followed the instructions in your documentation but when a file is selected, nothing happens.
Hi @holoiii,
The client-side (jQuery) uploads seems to be working successfully when I tried it here on my Rails 5 app.
Please make sure that:
//= require cloudinary
in your Asset Pipeline.<%= cloudinary_js_config %>
on that page.You've initialized the input field, e.g., by including the following in the form page as well:
<script type="text/javascript">
$('.cloudinary-fileupload').cloudinary_fileupload();
</script>
Let me know if this works for you?
Ahh I see.
$('.cloudinary-fileupload').cloudinary_fileupload();
That did the trick. None of your documentation mentioned that, however.
For example:
Thank you for the update. I'm glad it's working for you now :) Also, thank you for your feedback. We'll make sure to make this clearer in our docs. Anything else I can help you with?
Is this issue resolved, if it is, then I would suggest closing it. Should it be closed?
@andela-mpitan the deprecation warning still exists, so I'd recommend leaving the issue open until that's resolved.
While there's no ETA for this yet, it's on our road map to officially support Rails 5.
The error message is now a full on show stopper after upgrading to rails 5.1.beta1:
$ bin/rails s
=> Booting Puma
=> Rails 5.1.0.beta1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Exiting
/home/stephen/.rvm/gems/ruby-2.4.0@rails5/gems/cloudinary-1.5.2/lib/cloudinary/helper.rb:272:in `block in included': undefined method `alias_method_chain' for ActionView::Base:Class (NoMethodError)
Did you mean? alias_method
from /home/stephen/.rvm/gems/ruby-2.4.0@rails5/gems/cloudinary-1.5.2/lib/cloudinary/helper.rb:267:in `class_eval'
from /home/stephen/.rvm/gems/ruby-2.4.0@rails5/gems/cloudinary-1.5.2/lib/cloudinary/helper.rb:267:in `included'
from /home/stephen/.rvm/gems/ruby-2.4.0@rails5/gems/cloudinary-1.5.2/lib/cloudinary/railtie.rb:6:in `include'
from /home/stephen/.rvm/gems/ruby-2.4.0@rails5/gems/cloudinary-1.5.2/lib/cloudinary/railtie.rb:6:in `block in <class:Railtie>'
Any ideas? Removing the cloudinary gem 'resolves' the problem.
I concur with the above, really want to get on with the upgrade.
It's a show stopper indeed. Temporary workaround:
diff --git a/03_www.boingboing.com/config/cloudinary.yml b/03_www.boingboing.com/config/cloudinary.yml
index 5b5c31f..1c8a104 100644
--- a/03_www.boingboing.com/config/cloudinary.yml
+++ b/03_www.boingboing.com/config/cloudinary.yml
@@ -3,17 +3,17 @@ development:
cloud_name: dufdsudg8
api_key: '145433454379125'
api_secret: JaC96lb5345345345347PqbQ
- enhance_image_tag: true
+ enhance_image_tag: false
static_image_support: false
production:
cloud_name: duv534534udg8
api_key: '143653453453453479125'
api_secret: JaC96l543534534534MkRS7PqbQ
- enhance_image_tag: true
+ enhance_image_tag: false
static_image_support: true
test:
cloud_name: duv534534538
api_key: '145343451279125'
api_secret: JaC96lb0C534534534pDMkRS7PqbQ
- enhance_image_tag: true
+ enhance_image_tag: false
static_image_support: false
@oystersauce8 Hope those aren't your production credentials.
Rails 5.0.0 was released June 30, 2016. It's a little bit crazy that this commercially-supported gem doesn't support it yet.
@roeeba, @taragano can you please give us an update on this?
Totally agree.
Someone has even been kind enough to fix the relevant issue for Rails 5.1.0 (see #243). Can we (at the very least) get that one merged in?
Has anyone come up with a temporary hack meanwhile?
This is resolved on master with the merge of 3f996f7 from #243.
It would be great if you guys could please let us know if it's working for you now. Thanks
@taragano I can't test this change until there is a release because when I install cloudinary from Github, I get a Sprockets::FileNotFound
error in my app: couldn't find file 'cloudinary' with type 'application/javascript'
.
I think this oddness is due to some sort of packaging that is mentioned in the README:
During the installation or update of the Cloudinary GEM, the latest Cloudinary JavaScript library is automatically fetched and bundled with the GEM.
Any progress on this?
@kevinelliott This issue is fixed in version 1.7.0, which has #243 merged.
Closing this since the issue was fixed as stated above.
After upgrading to Rails 5 I am receiving the following deprecation warning:
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from block in included at /usr/lib/ruby/gems/2.3.0/gems/cloudinary-1.2.2/lib/cloudinary/helper.rb:273)