Railsgrammer

Archive for April, 2010

Linux Media Server – The Groundwork

by Matt on Apr.26, 2010, under Media

What I’m Looking For

Use

I want to have speakers and monitors / tv’s throughout my house with access control points throughout it to play all varieties of media for that particular area.  These control points will be cost effective computers with small displays to control playback for the use of that area.  These control devices could be a desktop, laptop, iPhone, iPod, iPad, tablet, etc.  My most treasured audio and video software for my clients is iTunes and for photo is iphoto.

Management

I would like to be able to easily add and retrieve files to the central media server, which would include all types of video, photo and audio files.

Accessibility

I want to access the files for their particular use on all platforms, Windows, Mac OSX, Linux, iPhone, iPad, etc.

Growth

As technology advances and as the devices I acquire grow with the advancement I want the software to support new technologies.

Firefly

Features

  • Unix or Linux, Windows (Beta), and soon to support Mac OSX
  • OGG, FLAC, Apple Lossless, WMA (Beta) and streaming radio stations
  • Configurable for web access
  • Smart playlists (Beta), iTunes Playlists
  • iTunes
  • Active community
  • Open Source, it’s free!

Accommodation

This seems to be a great fit for serving audio files to the clients and it supports iTunes.  Beta version supports all thick client platforms, I do not see support for iPhone, iPod or iPad.

Draw backs / Things to consider

From glancing at the documentation and wiki Firefly seems to be strictly command line configured.  Which would be fine because I happen to be savvy in command line but would like a gui interface to manage the configuration more easily.  However there is a web based configuration interface, once it’s installed and configured via command line.
Remnants of dropping windows support is in the forums.

Above and Beyond

Firefly can be configured to stream over the web.

MediaTomb

Features

  • Uses UPnP
  • mp3, ogg, flac, jpeg, etc. files.
  • Meta extraction
  • Thumbnail support
  • Both audio and video support
  • Automatic directory rescans
  • Plugin support
  • Web UI
  • Supports external URL’s for internet sources
  • Custom scripting capabilities
  • Support for Linux, FreeBSD, Mac OS X

Accommodation

Serves audio and video files, allows plugin support for adding new file types as technology progresses, thumbnail support would be nice, automatic directory scans would make it easy to update and manage the files, custom scripting is a nice feature (since I’m a geek).

Draw backs / Things to consider

No support for Windows, which is fine since that was a minor requirement of mine.  Has a lot of dependencies.

Above and Beyond

Custom scripting would be very useful, you can create a script to present your files as Music, Audio, Podcast, Movies, Other Videos, Photos, non-playable files such as documents or pdf’s.  You can even make a script to import a DVD.

I am looking forward to trying the two out, if you have any recommendations please throw them in the comments, I’ve decided to try these 2 out and if they do not satisfy I will look in to more options.

26 Comments :, , , , , , , more...

Get Mac OSX Snow Leopard edged for Ruby on Rails 3.0 – part 1

by Matt on Apr.17, 2010, under Ruby on Rails

First, why should you want to upgrade?

Ruby 1.9 is a new series of Ruby. It is modern, faster, with clearer syntax, multilingualized, a much improved version of Ruby.

  1. 1.8 has been used since 2003, I think it’s time for a new version
  2. Ruby 1.9 is is over 3 times faster than ruby 1.8.6 see it for yourself
  3. New methods
  4. Better syntax
  5. New classes

* read this great read up on ruby 1.9

Install ruby 1.9.1 fresh

(to upgrade skip this and see below)

Download

[msimpson@dakota ~] $ mkdir src
[msimpson@dakota src] $ cd src
[msimpson@dakota src] $ curl -Ov ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p376.tar.gz
[msimpson@dakota src] $ curl -Ov http://files.rubyforge.vm.bytemark.co.uk/rubygems/rubygems-1.3.6.tgz

Unpack, Make and Install Ruby

[msimpson@dakota src] $ tar -xzvf ruby-1.9.1-p376.tar.gz
[msimpson@dakota src] $ cd ruby-1.9.1-p376
[msimpson@dakota src] $ autoconf
[msimpson@dakota src] $ ./configure --enable-shared --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1 && make && sudo make install
[msimpson@dakota src] $ cd ..

Unpack and Install Rubygems

[msimpson@dakota src] $ tar xzvf rubygems-1.3.6.tgz
[msimpson@dakota src] $ cd rubygems-1.3.6
[msimpson@dakota src] $ sudo /usr/local/bin/ruby setup.rb
[msimpson@dakota src] $ cd ..

Or to upgrade

Download

I use the rvm gem, it freaking rocks! It manages the versions of ruby to use.

gem install rvm
rvm-install

Follow the instructions at the end of the last command then close and open a new terminal.

Install ruby 1.9.1 and use it

[msimpson@dakota ~] $ rvm install ruby-1.9.1-p378
[msimpson@dakota ~] $ rvm use 1.9.1

Check to see that it is installed

[msimpson@dakota ~] $ ruby -v
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.3.0]

*check out the website for rvm to see what kinds of ruby you can install (ie jruby, 1.9.2, etc.)

if all goes wrong down the road you can always switch to default

[msimpson@dakota ~] $ rvm use default

Play Around

Now that you have ruby 1.9 installed you can use some pretty rad new methods.

one of my favorites is Hash#each_with_index:

[msimpson@dakota ~] $ rvm use 1.9.1
[msimpson@dakota ~] $ irb
ruby-1.9.1-p378 > hash = {:name => 'matt', :verb => "loves", :noun => "ruby 1.9" }
 => {:name=>"matt", :verb=>"loves", :noun=>"ruby 1.9"}
ruby-1.9.1-p378 > hash.each_with_index{|value, index| print "index: #{index}, key: #{value[0]}, value: #{value[1]}\n" }
index: 0, key: name, value: matt
index: 1, key: verb, value: loves
index: 2, key: noun, value: ruby 1.9
 => {:name=>"matt", :verb=>"loves", :noun=>"ruby 1.9"}
21 Comments :, , , , , , , more...

Remove All Your Ruby Gems

by Matt on Apr.17, 2010, under Ruby on Rails

When it gets to a point to wipe out all of your gems just because you feel cluttered and you want to start fresh, this is what I did.
I had over 60 megabytes of gems and it was driving me kinda crazy because of my CDO.  So I wanted to remove all my gems and start fresh.
[msimpson@dakota test] $ sudo gem uninstall --all --ignore-dependencies `sudo gem list --no-versions`
Press return whenever prompted and you’ll end up nothing :)  ahhhh feels nice.
15 Comments :, , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...