I am building my first Ruby on Rails app which is going to be my own little community.
I have made the User model with several fields and information.
Now I am thinking of adding avatar support for the users. I've been researching and found that my best option would be using Paperclip, but then I encountered a little dilemma.
I want my users to be able to resize/crop their avatar image after they have chosen a image.
I have Googled a lot and since i am using jQuery i found that imgAreaSelect would be best in my opinion. And i think MiniMagick looks best.
So to my question. How can I best integrate Paperclip and imgAreaSelect?
I am new to Ruby and Rails so i don't know how i can resize the image.
Do you folks know how to integrate the to or maybe some other options that fits my needs best?
Ryan Bates covered cropping images using Paperclip and JCrop in Railscast 182. I'd recommend that you check it out.
Related
I've decided to start wrapping my head around Rails 3 by trying to build a website with it. I'm very new to it, and really I'm just looking for advice on how to get started. I've asked questions on here before and been asked "What have you already tried?", and in this case I've tried following a couple of tutorials I've found online, but they've all been for Rails 1 or 2, and there seems to be some differences in 3 I don't understand.
As for why I'm set on using Rails 3 and not 1 or 2 - it's to get up to speed at work, I've so far concentrated on front end development, but want to start branching out and doing more complex stuff.
What I want this site to do is allow a user to upload an image that is then displayed as a list item on the home page (later I'll add lightbox and stuff to it, but I figure that'll be easy to sort out).
Any advice or pointers to advice would be greatly appreciated.
Cheers!
File uploads in Rails are fairly well documented but as you've mentioned, a lot of the tutorials online are based around Rails 2.x.
If you're just starting out, I would recommend using either paperclip or CarrierWave to handle file uploads in a Rails app. Both projects are really good but I think you'll find that CarrierWave is more flexible in the long run.
Also, as a beginner to Rails, you might also want to checkout Ryan Bates' RailsCasts which are just an incredible resource for all things Rails. In fact, both CarrierWave and Paperclip file uploads are covered in the episodes. I've provided the links below.
#253 - CarrierWave File Uploads - this is Rails 3 specific.
#134 - Paperclip - Rails 2 but the information provided here along with the README on the projects GitHub page should provide you with the information you require.
This railscast is honestly all you need: http://railscasts.com/episodes/253-carrierwave-file-uploads
It will use Carrierwave for uploading and RMagick for image processing.
Lastly: nobody reasonable is going to recommend Rails 1 or 2 at this point. Just start with 3.2.5 and be good.
I've set up an application using mongoDB (mongoid) where I'm logging users in with omniauth-twitter.
I need people to be able to upload images, but I can't find any good tutorials for doing this on a mongoDB. I've looked far and wide, but nobody seems to have made one yet.
Do you have any links?
I'm not sure what your issue is here. Carrierwave handles mongoid through carrierwave-mongoid. If it doesn't suit you, paperclip handles mongoid, too, without hassle.
You can go to Rails Cast for Rails tutorials. The one I linked to explains paperclip ,doubt it will explain using it with mongoid.
This is a follow-up question to Uploading Pictures Ruby on Rails
I have read about Paperclip and watched the railscast on it. It seems to come highly recommended, but the post is quite old and most pages I am finding about it are from 2009ish.
I was wondering what recommendations people had for uploading and managing photos in Rails 3? Still Paperclip, or are there new gems or methods that I should consider in building photo functionality into a site?
CarrierWave is another option as well. I like that its a little more de-coupled from your models than Paperclip.
Im a newbie RoR kid, and I'm trying to make a web gallery app just like the onyx http://www.hulihanapplications.com/projects/onyx since it's outdated and i couldn't get it to work with my 2.3.8 rails' version.
So, are plugins like paperclip or carrierwave any good for me to start with. Or should i take another route and writh the app from scratch.
please provide me with good links regarding the subject.
thank you in advance
Paperclip is good way to start when it comes to any kind of images you'll add during runtime. You do have to install ImageMagick to change images into various sizes (thumbnails, etc), and it wouldn't be taking very long to create a webgallery with it (took me a day to figure it out).
http://www.cordinc.com/blog/2009/04/multiple-attachments-with-vali.html
Does anybody know a basic plugin/gem that will allow me to quickly set up a blog in Rails.
I would like it to have a WYSIWYG editor that allows image upload and basic editing.
All the Google results I checked out were tutorials to creating a blog in Rails.
I'm not looking to roll out my own solution, I'm looking for something that was already made, like Wordpress, but for Rails.
Thanks!
Try using Mephisto
PS: Search for "rails blog engine" in Google and you will find many other hits.
Mephisto and typo used to be the mainstream, but there are many new kids on the block these days.