Best practices for new Rails deployments on Linux?

I switched from Mongrel Cluster to Passenger two weeks ago (Debian Linux Server). I didn’t look back for a second. Passenger is probably the easiest way to get your new server up and running. Performance and reliability are reasonable too. Personally, I like to spend my time working on exciting new Rails projects rather than … Read more

How to show twitter bootstrap modal via JS request in rails?

I had a similar problem, which I solved with a slight twist My modal div is rendered on the calling page (from a partial) and not by the response of the JS request: <div class=”modal hide fade” id=”modal-window”> <div class=”modal-header”> <a href=”#” class=”close”>×</a> <h3>Loading…</h3> </div> <div class=”modal-body center”> <%= image_tag “loading.gif” %> </div> <div class=”modal-footer”>&nbsp;</div> … Read more

Renaming uploaded files with Carrierwave

Well, another problem with your random filename generator is that it’s possible to have collisions isn’t it? You could possibly generate a filename that was already generated. One way to go about it would be to somehow generate a hash based on unique properties of the image, like file path. An example, from the carrierwave … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)