Pictrails: RoR Based Web-gallery

Posted by Ben Allen Thu, 01 May 2008 01:24:00 GMT

Hello everyone, so if you haven't noticed I have not been posting much to Sysadmins' Chronicles lately. Well other then school, which has been consuming much of my time, I've been working on Pictrails. Pictrails is a web gallery written in Ruby on Rails. Currently my branch of the project is on Github at http://github.com/unilogic/pictrails. The original project is by a guy named Cyril Mougel and he has the master branch of the project here: http://github.com/shingara/pictrails. Currently my branch has the following features:

  • Photo-blog like front page (pictures for front-page are from selected gallery/album)
  • RSS feed of the front page photos and descriptions
  • Support for both RMagick (ImageMagick) and ImageScience (FreeImage)
  • Ability to create several galleries
  • Ability to create several pictures in a gallery
  • Ability to create a gallery from a defined directory on the same server as Pictrails (Mass Upload)
  • Show EXIF information from the picture
  • Download original photo
  • Aggressive caching of all public pages including RSS feed
  • Admin interface with login to add/edit/delete galleries, pictures, manage settings, and users
  • Settings to control the following
    • Define the thumbnails and pictures dimensions
    • Reset the caching system
    • Define the number of pictures per page shown per page
    • Define the number of galleries shown per page
    • Enable/Disable showing of EXIF info and downloading of original photos
    • Regenerate thumbnails and shown pictures based on new dimensions
    • Limit the number of items in your RSS feed
    • Select Image Processor (Rmagick or ImageScience)
    • Select the gallery the front-page is based on

The catalyst for me working on this project was http://benssite.org, which is my own web gallery based on two web application. SimpleGallery (my own app) runs the front page, and all the albums in the Gallery are hosted on Gallery. Ron and I are slowly trying to migrate away from any PHP based web application which Gallery is written in, and no web gallery written in RoR currently is available that suits my needs. Let alone running two web application for one site is a bit ridiculous.

Feel free to post any comments or suggestions here. The official bug tracking system for the master branch of the project is available at http://dev.shingara.fr/projects/show/3. However, currently I don't pay attention to it as I'm not a member of the development team of the official project. Also feel free to send me any messages on GitHub.

I will post again once I have http://benssite.org converted over to Pictrails, so you can see a full demo. Till then fair well and have a great day!

Ben

Programming Rails Applications on NetBeans 6.1

Posted by Ron Valente Mon, 14 Apr 2008 19:03:00 GMT

Introduction

I have been using NetBeans 6.1 IDE for some time forcing myself to use JRuby because of the issues that NetBeans has with Ruby. I must say my experience thus far has been superior to any NetBeans release to date. That being said I am planning on using this post to list potential to make the core NetBeans 6.X/7.X the best release for Ruby on Rails developers.

Enhancement Requests

I want to preface this section of the post with the fact that I feel NetBeans is a wonderful IDE and has many features that many Java developers benefit from. That being said this is by no means discrediting any of the wonderful advancements they have brought to the Rails IDE arena.

Permissions

Using NetBeans 6.1 without JRuby is just a hassle. The implementation either needs to be dropped or made more seamless.

Gem Management

There needs to be a better quicker way to manage gems. Currently it is a long painful process which is different from what Rails developers are used to. I am a die-hard Mac OS X Rails developer and I am used to opening up the terminal and managing my gems there. I thing the best solution for this is to have a jruby/gem console that opens the terminal with the correct PATH specified and all the gem management can be done right there.

Rake Tasks

Rails developers prefer using their keyboards with shortcuts. We are used to quick editors that have great keyboard support. The editor that comes to mind is TextMate. That being said I feel there must be a better way to run rake tasks and other commands that are run frequently through the command line.

Source Code Management

GIT is the new hotness in the rails world and there needs to be solid support for git in NetBeans. There is not much of a message here except for that git support is a must.

Capistrano Integration

This would make NetBeans a HUGE success. Integration with Capistrano for developers to deploy their application. There could be some sort of collaboration on deployment where you can test each app that is marked for deployment on a local glassfish server and then one of the choices get deployed out to production.

Conclusion

Any of the above enhancement requests are welcome to collaboration and improvement via commands or email. I look forward to your comments.

TOTD: Installing Git on Mac OS X

Posted by Ron Valente Mon, 14 Apr 2008 16:42:00 GMT

Introduction

Git has become quite the popular version control system in the rails community. That being said I am announcing that I will stop using ports for my tutorials and install everything from source. There are advantages and disadvantages to this and the main reason is that I am sick of waiting for ports that are outdated.

Requirements

This install is quite easy. All the dependencies required ship with Mac OS X Leopard. That being said lets get started. For this to install successfully you must have the following installed on your computer:

  • Apple Developer Tools

Installation

Download the latest package from Git At the time of writing this tutorial the current version is Git 1.5.5.

Below are the directions to completely install the Git version control system.

cd /usr/local/src
curl -O http://kernel.org/pub/software/scm/git/git-1.5.5.tar.bz2
tar -xjf git-1.5.5.tar.bz2
cd git-1.5.5
./configure --prefix=/usr/local
make
sudo make install

What Have We Been Doing?

Posted by Ron Valente Mon, 14 Apr 2008 16:29:00 GMT

Introduction

Lately I have been working hard testing many deployment options for rails applications. The results are quite interesting. I will be going into detail analysis of each setup that we testing including hardware I used, how I setup each test, the benchmarks (obviously) and lastly the winners for each category. As we know DHH doesnt recommend Rails apps to be hosted on shared hosting solutions. That being said Slicehost has done wonderfully and we recommend them highly.

Our Situation

We have been looking for a way to optimize our rails app hosting solution. Currently we use Litespeed 3.3.9 and the Ruby LSAPI. This decreases the memory requirements immensely compared to other solutions like thin.

Testing

Ruby Interpreter Tests

  • Ruby18/JRuby - Performance & Memory Requirements

WebServer Tests

  • Nginx with Mongrel
  • Nginx with Thin
  • Litespeed
  • Apache with Passenger
  • Glassfish/JRuby

More on all of this in my upcoming post. Any comments are requests for benchmarks are welcome and encouraged!

Regards, Ron