The basic sample uploads local and remote image to Cloudinary and generates URLs for applying various image transformations on the uploaded files.
- Before running the sample, copy the Cloud Name, API Key and API Secret configuration parameters from Cloudinary's Management Console of your account into
config.rb
file of the project. - Run
bundle install
in project directory to bring all the required GEMs. For the basic sample, you can also simply rungem install cloudinary
. - Run the sample using
ruby basic.rb
.
Similar to the basic sample described above, implemented as a Rails project. In addition to image uploads, this sample application demonstrates the usage of Cloudinary's view helpers (e.g. cl_image_tag
) to apply various image transformations inside Rails views.
- Download
cloudinary.yml
for your account from Cloudinary's Management Console or by using this direct link. - Place the downloaded
cloudinary.yml
file into theconfig
directory of the project. - In the project directory, run
bundle install
to install all the required dependencies. - Run
rails server
to start the development server. - Open the sample page in a browser: http://localhost:3000
Simple application for uploading images and displaying them in a list. Implemented using Rails and CarrierWave GEM for uploads.
- Download
cloudinary.yml
for your account from Cloudinary's Management Console or by using this direct link. - Place the downloaded
cloudinary.yml
file into theconfig
directory of the project. - In the project directory, run
bundle install
to install all the required dependencies. - Run
rake db:create
andrake db:migrate
to create the database for the project. - Run
rake cloudinary:fetch_assets
to fetch the latest JavaScript library files and create the JavaScript index files - Run
rails server
to start the development server. - Open the sample page in a browser: http://localhost:3000
- Ruby on Rails integration documentation
- Image transformations documentation
- View helpers defined in helper.rb are automatically available to Rails projects.
- CarrierWave integration documentation
- RailsCasts episode on CarrierWave