Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this example? #12

Open
AndreaBarbon opened this issue Aug 21, 2012 · 8 comments
Open

How to use this example? #12

AndreaBarbon opened this issue Aug 21, 2012 · 8 comments

Comments

@AndreaBarbon
Copy link

Hi Nico,

I was able to make this work o my local machine. But now I would like to insert the uploader in one of my existing projects, and I don't know how to do it.
In particular, I don't understand how to use the command

bundle exec rake uploader:deploy

inside my app.

This is what I did so far:

  1. Generated the table uploads and migrated
  2. Copied the code in uploads_helper
  3. Copied all te uploader js files in my asset folder
  4. Set the host in the s3_uploader.js file
  5. Inserted the s3 credentials in environment.rb
  6. copied and rendered the _uploader.html.haml file

But when I choose a file in the form nothing happens.

Please could you tell me what I miss? If you help me I will then write all the steps in your readme ;-)

Thank you very much,

Andrea

@AndreaBarbon
Copy link
Author

Ok, now I also added

'aws-s3', :require => 'aws/s3' 

to the gemfile, and I copied the uploader.rake file in the tasks folder of my app.

But unfortunately when I run

bundle exec rake uploader:deploy

I get the following error:

uninitialized constant AWS::S3::Base

PS: I already restarted my local server, but it persists.

@ncri
Copy link
Owner

ncri commented Aug 21, 2012

Hi Andrea, you probably did run bundle after you added the gem? I ask just to make sure. There also has been a new version of the gem, i suspect it might be not compatible with my code. Try fixing the gem to version 0.6.2.

@AndreaBarbon
Copy link
Author

Yes after.
By the way I tried with 0.6.2 but nothing changes...

@AndreaBarbon
Copy link
Author

Do you need more information on this?

@ncri
Copy link
Owner

ncri commented Aug 21, 2012

You could check in irb if the s3 classes are loaded? Like AWS::S3::S3Object.

@ncri
Copy link
Owner

ncri commented Aug 22, 2012

I mean in the rails console.

@AndreaBarbon
Copy link
Author

I checked and this class is loaded in irb:

1.9.3p194 :001 > AWS::S3::S3Object
=> AWS::S3::S3Object

2012/8/22 Nico Ritsche [email protected]

I mean in the rails console.


Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-7924891.

@ncri
Copy link
Owner

ncri commented Sep 20, 2012

Have you gotten this working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants