2

I am using rack framework with active record and there is no rails , so when i upload an image to cloudinary using carrierwave gem i am getting the following error.

Unexpected error while processing request: uninitialized constant Cloudinary::CarrierWave::Storage::Rails

itzmebibin
  • 9,199
  • 8
  • 48
  • 62

2 Answers2

5

That was a bug in cloudinary gem, now this has been solved by Cloudinary team.

Please refer to this #Issue-154

Hope it helps.

4

Based off of this ,you can't use carrierwave gem without rails. You should be able to do something like:

you can use meta-programming in ruby.

Just override the class of Carrierwave and create a storage.rb file :

Cloudinary::CarrierWave::Storage.class_eval do
 /// Your code here...
end
Ankit Pandey
  • 460
  • 4
  • 12