Note: The instructions in this article refer to a deprecated package for managing Cloud Files with Ruby. While these instructions should work for now, going forward the preferred package for ruby is fog, which is forked in our github repository.
Contents |
Overview
In this tutorial we will explain how to install the ruby API on your machine we will cover both Windows and *Nix installs (OSX should be the same). We assume that Ruby is installed on the machine. For help on installing Ruby the language check out the Ruby website
What we need
Windows Installation
gem build cloudfiles.gemspec
You should get some output that looks like this:
Successfully built RubyGem Name: cloudfiles Version: 1.4.0.0 File: cloudfiles-1.4.0.0.gem
Now run this command:
gem install cloudfiles
You should get some output like this:
Successfully installed cloudfiles-1.4.0.0 1 gem installed Installing ri documentation for cloudfiles-1.4.0.0... Installing RDoc documentation for cloudfiles-1.4.0.0...
If you get some output that looks like this:
ERROR: Gemspec file not found: cloudfiles.gemspec
Or
ERROR: could not find gem cloudfiles locally or in a repository
You might not be in the right directory ensure there is a cloudfiles.gemspec file in the rackspace-ruby-cloudfiles-14f562bda9b9f6815fa8acee4117684502a8ec90 folder.
*Nix Installation
tar zxvf ~/Desktop/rackspace-ruby-cloudfiles-14f562bda9b9f6815fa8acee4117684502a8ec90
cd ~/Desktop/rackspace-ruby-cloudfiles-14f562bda9b9f6815fa8acee4117684502a8ec90
gem build cloudfiles.gemspec
You should get some output that looks like this:
Successfully built RubyGem Name: cloudfiles Version: 1.4.0.0 File: cloudfiles-1.4.0.0.gem
Now run this command:
gem install cloudfiles
You should get some output like this:
Successfully installed cloudfiles-1.4.0.0 1 gem installed Installing ri documentation for cloudfiles-1.4.0.0... Installing RDoc documentation for cloudfiles-1.4.0.0...
If you get some output that looks like this:
ERROR: Gemspec file not found: cloudfiles.gemspec
Or
ERROR: could not find gem cloudfiles locally or in a repository
You might not be in the right directory ensure the cloudfiles.gemspec file is in the rackspace-ruby-cloudfiles-14f562bda9b9f6815fa8acee4117684502a8ec90 folder.
Check our work
Head to terminal or command prompt and launch the interactive Ruby Prompt using this command.
irb
You should be presented with a prompt that looks like this:
irb(main):002:0>
Now run this command:
require 'cloudfiles'
You should get some output like this:
irb(main):003:0> require 'cloudfiles' => true
If you get an error like this:
irb(main):001:0> require 'cloudfiles' LoadError: no such file to load -- cloudfiles from (irb):1:in `require' from (irb):1
The API was not installed correctly please run over the guide again. If you keep having troubles please feel free to shoot us an email with any questions to cloudfiles@rackspacecloud.com
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

2 Comments
404
You know the Github link 404s, right?
re: 404
http://rubygems.org/gems/cloudfiles
It looks like there's also a replacement with broader functionality in the works here:
https://github.com/rackspace/fog
Add new comment