At the RMagick repo on Github, a message was uploaded yesterday saying the main author cannot continue to maintain the project, and is looking for new people to take over. (I would certainly crash it were I to ever attempt such a job!). You can see their readme here: http://github.com/rmagick/rmagick.
In your opinion, where should a Rails 3 / Heroku / S3 app go, given that it is trying to use Paperclip for file uploads?
I think you are asking about whether to use RMagick or another alternative such as ImageScience. Is that correct? You don't actually need any of those libraries: Paperclip doesn't require them as long as the ImageMagick binaries are available on the app servers.
Related
I'm building a social network and have been using the gem community_engine but have been having trouble implementing the large amount of customization that I need for my app. I figure this will make it easier for me to override and add methods, as well as help me to better understand and learn from the code since I will be able to actually see all of it in action.
So far in my attempt I downloaded the source code, added the default bin directory and config files that were missing, as well ass all the gem dependencies.
What else do I need to do to get the app to work? I realize that there may still be a lot and that it might not be easy to explain, but at the very least is there any sort of documentation out there that might help me understand how to convert the gem to a Rails application?
Heres the community_engine repo: https://github.com/bborn/communityengine
Because this idea may draw some criticism, I'll add that I was originally building the app without any huge plugins accept for devise however I'm running out of time to finish this.
More stuff I've tried:
Moving files to a new rails app, got server to run but encountered many seemingly random errors, fixed a few but more just seem to pop up that I cant figure out:
I also took a look at http://guides.rubyonrails.org/plugins.html but this gem seems to go beyond that.
I would suggest that you clone the gem and begin copying files from the gem into your a new Rails application.
The engine gem probably has a similar structure to a Rails application, so you should be able to move the files from the corresponding folder to the same folder in your Rails root folder.
You may need to move gem files out of modules, change namespaces etc. Relevant folders to look at files you'll want to include might include app/ config/ db/, any gem dependencies in Gemfile or the gemspec file, as well as spec/ or test/.
Beyond that I think there's no silver bullet answer to your question, you're just going to have to work through problems until you have this up and running, and perhaps ask subsequent questions if you hit on an obstacle that you don't get beyond.
I think what you're looking for is a way to hook your Rails Engine into a rails app. The Hooking Into an Application section of the Getting Started with Rails Engines guide should be exactly what you're looking for.
Here are two additional resources on Rails Engines.
A Guide to Rails Engines in the Wild
Rails::Engine - Ruby on Rails API
I want to customize spree. I have downloaded the source files and modified them. Then I ran install.rb which built and installed gems. The question is: can I see the result of the development without gems building, which takes too much time? I'm newbie to RoR.
Customisations to spree are, in almost all cases, better made in your application rather than by modifying spree's source files. The spree developer docs explain how to do so (see in particular the customisation section):
http://guides.spreecommerce.com/developer/
I'm trying to enable image uploads for a model in my Rails app. I'm using the CarrierWave gem, but in order to do any image manipulation like thumbnail resizing I must have Imagemagick installed on the actual computer for use with the Rmagick gem.
Here's the problem: I'm turning this app over to a painter who will log in and upload her own art. This means she won't be in my development environment that has Imagemagick installed. I'm really confused about the role of Imagemagick here - will image manipulation simply not work anymore when the app is deployed, or does it persist somehow?
Feel free to correct me if my understanding of this is completely screwy. Or, is there a better solution available?
ImageMagick must be installed to install RMagick; RMagick is an interface to ImageMagick's libraries, and calls ImageMagick's functions to do its processing.
If the ImageMagick libraries and development headers are not present on the deployed machine, RMagick installation will fail.
When you 'turn over' your app to the painter what this really means is that you'll deploy your application to a platform like Heroku (i.e. a production environment) that will host your Rails app for you. If you choose Heroku, all will be well because their Rails setup includes Imagemagick and you don't need to do anything.
The key here is to ensure that whatever provider you use to host your Rails app, they either have Imagemagick installed or it is an option for you to do that manually.
Personally I'd go with something like Heroku, it's easy and the interface is slick and pretty. Here is their setup guide: https://devcenter.heroku.com/articles/rails3
OK so I'm looking for a good image uploading gem that is Rails 3 compatible and has no dependencies. I was using attachment_fu, but it's Rails 3 compatibility seems to be in question. And I really wanted to use Paperclip, but it has an image majick dependency. I'm having a hard time finding other alternatives...
Stupid question #1: Shouldnt Rails have some "official" image uploading scheme thats baked into the framework? Every web app will need it at some point, and hunting around every time for some questionable third-party way of doing this gets old after awhile.
Stupid question #2: Why can't Paperclip have a no-dependency mode that doesnt make thumbnails or resize, and just stores images as they are uploaded?
As someone who has Rails with Paperclip running on both Linux, Mac and Windows, I can tell you: installing ImageMagic (or whatever spelling is) is not a problem.
In fact, my old linux hosting already had it, Mac laptop, IIRC, too. I expected some problems installing it on windows, but had to just download installer and specify correct path in rails. No problem whatsoever.
So, in your place, I would really give it a try.
edit
There's also a number of file upload plugins for Rails, but I didn't use them and can't really give advice there. Google will give you examples.
I am going to be away from the internet for a few weeks and would still like to get a project done. What steps should I take to make sure I have access to the things I need (ruby and ROR) while I will be disconnected?
when offline, the following are hard to get:
gems
docs
rails expert blogs
stackoverflow ;-)
so,
gem install as much as you can
download all the railscasts
keep one or two rails book around
and find a place with internet wifi
and most importantly:
un-plug yourself 2 days before the real offline, that's called staging ;-)
If you use version control, make sure you can work offline. DVCS do this well, I've heard SVN can work offline if you have a local SVN server.
Running the Rails app on localhost will allow you to access it with your browser locally.
Apart from this it would also be nice to have documentation offline too. Download everything you can think of: Rails, Ruby, Shell, libs etc. Or use books.
Make sure you have local copies of any documentation you need (railsapi.com lets you download the Rails docs)
Make sure you have all the gems/plugins you need
This may not affect you, but it's bitten me before.
If you are using a javascript library such as jQuery, and are linking to Google's Hosted Libraries rather than a local one, you may find jQuery stops working when you are offline.
Download and link to a local copy before you go.
Get your app (in its current state) up and running on your laptop. Then shut off wireless and make sure it still goes. Don't just guess at what gems and things you'll need - make sure you see it actually run. Don't forget things like database engines and queuing servers. Then start guessing about other gems and items you might need.
Make sure that
gem server
will start up a webserver and let you browse the docs for all your installed gems.
Download every Ruby gem. All of them!
You never know when you'll need to extract EXIF data, or something.