Help Regarding Amazon S3 and Career Wave along with Rspec

hello Guys,
i would like to know some details regarding how to implement AMAZON S3
with Career Wave in Rails 3.0.3 and i have to write Rspec test Cases
as well . Actually i already have code which is implemented with
Career Wave its a image uploading code and i need to change that code
on AMAZON S3. Can you guys help to me to make those changes and in
writing RSpec test Cases.Its really important and urgent…

Thanks
Nishant

On Fri, Mar 11, 2011 at 12:03 PM, nishant [email protected]
wrote:

hello Guys,
i would like to know some details regarding how to implement AMAZON S3
with Career Wave in Rails 3.0.3 and i have to write Rspec test Cases
as well . Actually i already have code which is implemented with
Career Wave its a image uploading code and i need to change that code
on AMAZON S3. Can you guys help to me to make those changes and in
writing RSpec test Cases.Its really important and urgent.

Are you talking about Carrierwave? If you are then you can try the
documentation for it which discusses everything you would like to do.

https://github.com/jnicklas/carrierwave

B.

On Sat, Mar 12, 2011 at 1:54 AM, nishant nigam
[email protected]wrote:

i would like to know some details regarding how to implement AMAZON S3
https://github.com/jnicklas/carrierwave

I don’t know of any application called Career Wave. I thought you meant
Carrierwave and had misspelled it by accident. The link I sent was for
Carrierwave. Sorry for the confusion.

B.

Hey Bryan i have checked the link which you have given but i am not
getting
it, like the code i have is already created in Career Wave and i need
to
change that code and made up for Amazon S3 and have to write the code
for
rspec

On 11 March 2011 14:02, Bryan C. [email protected] wrote:

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


T**hanks and Regards
Nishant Nigam
“Destiny is not a matter of chance,
it is a matter of choice;
it is not a thing to be waited for,
it is a thing to be achieved.”

Bryan, I am talking about the same thing i would like to use that one
for
avatar uploading of users that code is currently in Carrierwave and i
wanted
to change that code with S3 amazon there is a section of s3 in that link
but
i am not getting it…
like i have made changes in the storage to S3 previously it was file and
made lots of changes but client not satisfied…

any help would be much appreciated…

On 12 March 2011 00:47, Bryan C. [email protected] wrote:


T**hanks and Regards
Nishant Nigam
“Destiny is not a matter of chance,
it is a matter of choice;
it is not a thing to be waited for,
it is a thing to be achieved.”

Bryan i did those changes …i dont know how to change the main uploader
code from where the file will upload… and i also need to write the
rspec
test cases for the same…

On 12 March 2011 08:12, Bryan C. [email protected] wrote:


T**hanks and Regards
Nishant Nigam
“Destiny is not a matter of chance,
it is a matter of choice;
it is not a thing to be waited for,
it is a thing to be achieved.”

On Sat, Mar 12, 2011 at 2:54 AM, nishant nigam
[email protected]wrote:

Do you have an Amazon S3 account? Have you loaded the fog gem (
https://github.com/geemus/fog) and done the other configurations that
Carrierwaves instructions has specified? “Youll need to provide your
fog_credentials and a fog_directory (also known as a bucket) in an
initializer. You can also pass in additional options, as documented
fully in
lib/storage/fog.rb”

B.

On Sat, Mar 12, 2011 at 11:29 AM, nishant nigam
[email protected]wrote:

Bryan i did those changes …i dont know how to change the main uploader
code from where the file will upload…

Everything is explained right in the documentation. If you installed
fog
and have an Amazon S3 account to provide as the fog credentials and fog
directory then following the below steps in the documentation is easy.
From
the Carrierwave documentation (https://github.com/jnicklas/carrierwave):

Using Amazon S3

Fog http://github.com/geemus/fog is used to support Amazon S3. Ensure
you
have it installed:

gem install fog

Youll need to provide your fog_credentials and a fog_directory (also
known
as a bucket) in an initializer. You can also pass in additional options,
as
documented fully in lib/storage/fog.rb. Heres a full example:

CarrierWave.configure do |config|
  config.fog_credentials = {
    :provider               => 'AWS',       # required
    :aws_access_key_id      => 'xxx',       # required
    :aws_secret_access_key  => 'yyy',       # required
    :region                 => 'eu-west-1'  # optional, defaults

to ‘us-east-1’
}
config.fog_directory = ‘name_of_directory’ #
required
config.fog_host = ‘https://assets.example.com

optional, defaults to nil

  config.fog_public     = false

optional, defaults to true

  config.fog_attributes = {'Cache-Control'=>'max-age=315576000'}

optional, defaults to {}

end

In your uploader, set the storage to :fog

class AvatarUploader < CarrierWave::Uploader::Base
  storage :fog
end

Thats it! You can still use the CarrierWave::Uploader#url method to
return
the url to the file on Amazon S3.

and i also need to write the rspec test cases for the same…

You will need to write them yourself. That is the job you accepted for
the
client you are doing the work for. If you have errors in your tests or
errors when they run feel free to post the error you are getting to the
group for help in debugging.

B.

Thanks Bryan…

On 12 March 2011 14:44, Bryan C. [email protected] wrote:

class AvatarUploader < CarrierWave::Uploader::Base

You will need to write them yourself. That is the job you accepted for the
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


T**hanks and Regards
Nishant Nigam
“Destiny is not a matter of chance,
it is a matter of choice;
it is not a thing to be waited for,
it is a thing to be achieved.”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs