I am adding functionailty to our website so users can upload pictures to our site and I'm going to use amazon s3 for that.
I came across these three gems:
aws-sdk (https://github.com/amazonwebservices/aws-sdk-for-ruby)
right_aws (https://github.com/rightscale/right_aws)
aws-s3
I read that aws-s3 is not as good as right_aws, and doesn't get update as often. But I can't find anywhere that compares right_aws vs aws-sdk and looks like they are both directly written by amazon.
Also I came across an article that was using paperclip and aws-s3 together, do I need to use paperclip with any of those as well?
any ideas?
Definitely use The official AWS SDK for Ruby (docs). Some gems unfortunately depend on fog, which was written before amazon's version came out. I would only use fog if another gem, such as carrierwave, dragged it in.
Related
I have an rails app deployed to Heroku. It has image uploads. After deployed to heroku again, i am unable to see old images that are uploaded.
Is heroku reset images folder when app is re-deployed? Please tell me the reason behind it.
Background
Heroku uses an 'ephemeral file system', which from an application architecture point of view should be considered as read-only - it is discarded as soon as the dyno is stopped or restarted (which, along with other occasions, occurs after each push), and is also not shared between multiple dynos.
This is fine for executing code from, as most application data is stored in a database that is independent of the dynos. However, for file uploads this presents a problem, and so any uploads should not be stored directly in the dyno filesystem.
Solution
The simplest solution is to use something like Amazon S3 as your file upload storage solution, and, if using a gem like Paperclip, this is natively supported within the gem. There is a great overview article in the Heroku Dev Center about using S3 and Heroku (https://devcenter.heroku.com/articles/s3), which leads into an article contributed by Thoughtbot (the developers of Paperclip) on implemenation specifics within a Rails app (https://devcenter.heroku.com/articles/paperclip-s3)
I am trying to introduce HTML5 Server-Side-Event to my Rails 3.2 project. I did some search at Google.com, but most of the examples are using php. There's only one example on Rails that is using Goliath, and I am not using that.
I am using Thin in my development and deploying with passenger. I think it's valid for doing text streaming for SSE. Is there any examples on Rails 3.2 for reference?
Rails 4.0 is implementing SSE, upgrading your rails and implementing SSE via rails 4.0 ActiveController::Live is probably the best option.
Otherwise you may be stuck with a less stable/performant/maintained option such as Juggernaut or other frameworks.
Source :
http://ngauthier.com/2013/02/rails-4-sse-notify-listen.html
http://edgeguides.rubyonrails.org/4_0_release_notes.html#railties-notable-changes
You can check out 'Cramp' gem - http://cramp.in/
It's having built in support for HTML5 tehcnologies - WebSockets and SSE
This isn't exactly HTML 5 Server Side Events but it is a tried and true method to accomplish essentially the same. To push from the server to the client, in the past a lot of people including myself have used the Juggernaut gem (https://github.com/maccman/juggernaut - runs on top of node.js). A little different than Server Side Events but perhaps more time tested. The gem is still being updated it seems.
i would like to deploy my ruby on rails website. I am using rails 3.2 and ruby 1.9.3, so have the assets pipeline feature. What i would like to know is who offers the most complete hosting package ( or easiest as I am new to rails). I don't mind paying for a package or trying a free one, just as long as its idiot proof :).
Any advice helpful as I would like to get this uploaded for a client
Heroku is pretty much today's standard for deploying Rails app, if you are into paying for it.
I would personally recommend to deploy in your own server if possible. It's much more versatile and not difficult at all. You could also make the procedure more efficient by using a tool like capistrano, which i highly recommend.
I need a simple way to get general product information from Amazon into an object in my rails application. I would like to be able to search Amazon product info and return title, author, page count and cover photo for each search result.
I have found information about using AWS to do this but none of the examples provide a detailed way to do so. Seems like it should not be that heard. I am a newbie for rails.
This amazon-ecs gem allows you to access Amazon product information using Ruby. The developer's page provides plenty of usage examples.
Installation:
$ gem install amazon-ec
I am new to Ruby on Rails. I'm creating an application that allows user generated content, including photo uploading. I have worked with file uploading in PHP applications, but since I'm new to Ruby and Rails, I was wondering if there is a common technique, plugin, or gem that makes managing file uploads really easy.
You need the Paperclip gem. Watch this awesome video from Ryan Bates over at RailsCasts.com then you'll be ready to rock. http://railscasts.com/episodes/134-paperclip
It's easy!