at the moment I'm using this: https://github.com/technoweenie/attachment_fu for uploading files.
at the moment i'm running with rails 3.2.12 but soon I want to upgrade to 4.2
can I use this plugin with 4.2 or do I need to use another one?
attachment_fu is a very old plugin and from the github page it appears as if the development has stopped, so I doubt it will support Rails 4+
These are some good alternatives:
https://www.ruby-toolbox.com/categories/rails_file_uploads
Carrierwave and paperclip are the most faous ones and pretty easy to setup.
Paperclip is a smart choice for file uploading. You can use it in rails 3 & 4.
Related
i have a rails application using PaperClip with CKEditor version 3.7.
i would like to enable upload of images from the local file system. i see i can use FCKEditor but all i can see is it's applicable for PHP and ASP.Net.
is that another option or do i need to do custom integration?
You can integrate elfinder into ckeditor.
http://elfinder.org/
https://github.com/Studio-42/elFinder/wiki/Integration-with-CKEditor
https://github.com/phallstrom/el_finder
https://github.com/phallstrom/el_finder-rails-example
Disclaimer - I wrote the Rails connector. It's meant for 1.x elfinder, but will work with 2.x using the translater (not everything is supported yet though). I'm working on pure 2.x support now.
How am I supposed to use bootstap with rails 3.0 rather than >= 3.1 ? is there any plugin which supports rails 3.0 ?
I think all of the bootstrap gems require Rails 3.1 or greater. I recently had bootstrap on a 3.0.10 Rails app using the Less.js file that you download from their site: http://lesscss.org/. This is the simplest most basic way to use Twitter-Bootstrap; the file compiles all of your "my_file.less" files into css on the client side.
However, if you want to modify the variables (which is the real power of using this framework) than you need to compile it. You can take a look at this Less compiler: http://wearekiss.com/simpless. I've never tried that, but I hear good things about it and it works on Mac, Linux, or PC.
Probably the easiest thing to do - if you want to compile the code on server side - would be to upgrade your project to Rails 3.1.1 and just use one of the Twitter Bootstrap gems. This is actually exactly what I ended up doing. I was able to update my app to 3.1.1 and I used the Boostrap-Sass gem (just because I slightly prefer Sass).
If you decide to upgrade, follow this RailsCast: http://railscasts.com/episodes/282-upgrading-to-rails-3-1
It helped me a lot.
Ryan Bates also offers a video on how to incorporate Twitter Bootstrap into a Rails app: http://railscasts.com/episodes/328-twitter-bootstrap-basics.
Here's a link to the Sass version of Bootstrap that I am currently using: https://github.com/thomas-mcdonald/bootstrap-sass
Many solutions : you can upgrade to rails 3.1+, might be the better (not the easier, depending on you app) way. You can include the static files yourself if you don't intend to change anything that is handled at the less level. You can do it even if you intend to, but you'll have to recompile the files yourself (or find a way to automate it). Finally, there might be a gem out there that is compatible with rails pre-asset-pipeline, or an old version of a gem. You'll have to look for yourself if you absolutely want a gem.
Normally I'd use carrierwave, but they do not officially support jruby, and I've been running in to bugs, possibly related. (https://github.com/jnicklas/carrierwave/issues/620, Image corruption on upload to s3, production only. (carrierwave, engineyard))
Have others had success here?
I'm considering trying out paperclip, but it looks like that may not be perfect either-- https://github.com/thoughtbot/paperclip/issues/100
Try dragonfly it's a really great library to manage you file attachment.
check out this guide, it's cake
http://webtempest.com/how-to-allow-image-uploads-in-rails-on-heroku/
It uses paperclip and amazon web s3 gems
I'm having issues with CKEditor. I can upload and insert pictures without issues, but when I try to do the same with files, the link to my file is set to something like javascript:void(0)/*130*/, with the number changing. This is happening on FF/Safari/Chrome.
My app runs on rails 3.1.3, using MongoDB/Mongoid as database/ODM, with paperclip for handling attachments and using S3 for hosting assets. When I explore my bucket I can see that the files are uploaded correctly, so the problem (probably) come from somewhere else. I'm using this gem, and both the rc2 & the master branch doesn't fix that.
Thanks for your time.
Well it's been a while. I solved it by forking the gem (cf ksol/ckeditor), but the diff is too obfuscated to remember what was wrong. Hopefully the original gem is working now.
Hi I am looking for a very good solution to upload and download document file types directly to and from the database using rails 3.1.x ... I used paperclip for that but image-magick is pain to install on windows..please help me in these... Thanks
If you're not uploading images, you don't need to install image-magick.
As for storing to the database using Paperclip, see this topic.