mkisofs -dvd-video -udf -o dvd.iso dvdfiles/
hdiutil burn -noverifyburn dvd.iso
I just found this library. Its design is based on the well-known Boost library.
To install:
sudo gem install rgl
After updating the metadata on 150+ gems (that I don't care anything about):
Successfully installed stream-0.5
Successfully installed rgl-0.2.3
2 gems installed
Installing ri documentation for stream-0.5...
Installing ri documentation for rgl-0.2.3...RDoc failure in lib/rgl/rdot.rb at or around line 59 column 0
Before reporting this, could you check that the file
you're documenting compiles cleanly--RDoc is not a
full Ruby parser, and gets confused easily if fed
invalid programs.The internal error was:
ERROR: While executing gem ... (ArgumentError)
invalid mbstring sequence
Don has completed the 3rd series of Knifethrusts and has asked me to help him get them online as a sort of literary installation piece. (Not like the blog I setup for him, or the original site [soon to be repurposed].) This will involve both a linear reading experience and a topic-based (tag) approach to the material.
As such, I thought I'd use this as an opportunity to try out Ruby and Rails.
After installing Rails (Edge) on OS X, I started getting various errors about 'sqlite3'. So, I decided to do a little research.
It turns out that SQLite3 is the new default (development) database for Rails and is also pre-installed on OS X (>Tiger).
When I tried to install the Ruby bindings, I received:
I found a post that described a fix:
sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install sqlite3-ruby
Of course, this means I have to install apt-get, except that on OS X we use MacPorts.
I don't need sqlite3, so can exclude it.
Well, that didn't work. Apparently, there is no such thing as "libsqlite3-dev" through ports.
I found another post that suggests getting the SQLite3 source code.
Installing Rails is supposed to be easy. (This isn't in the instructions of the video, but I assume I need to actually install Rails at some point!)
sudo gem install rails --include-dependencies --no-rdoc
(I used '--no-rdoc' proactively.)
Successfully installed activesupport-2.0.2
Successfully installed activerecord-2.0.2
Successfully installed actionpack-2.0.2
Successfully installed actionmailer-2.0.2
Successfully installed activeresource-2.0.2
Successfully installed rails-2.0.2
6 gems installed
Installing ri documentation for activesupport-2.0.2...
Installing ri documentation for activerecord-2.0.2...
Installing ri documentation for actionpack-2.0.2...
Installing ri documentation for actionmailer-2.0.2...
Installing ri documentation for activeresource-2.0.2...
Despite the '--no-rdoc', it seems to have installed the documentation. Oh well, no errors.
Ah, but I am running Ruby 1.9 which is not compatible with Rails 2.0.2. Ugh.
Using the latest Rails, Rails worked! (Welcome to life on the Edge.)
As I started to research this topic, there are several Slicehost tutorials on setting up various configurations. But there is a Slicehost blog entry that references the deprec stuff mentioned earlier.
Mongrel is apparently the darling of the Rails community. According to its homepage:
But I keep reading about how to configure other web servers (Apache, Lighttpd, Nginx) as reverse proxies for Mongrel.
Mongrel is a fast HTTP library and server for Ruby that is intended for hosting Ruby web applications of any kind using plain HTTP rather than FastCGI or SCGI.
Installing Rails on a fresh Ubuntu Gutsy (non-Slicehost specific) install is described here.
The first thing to consider is which supported Linux distro to use. (The comparison page, which turns out is not actually that useful.) This list is not exhaustive, however, as I also ran across a few discussions (and a podcast) about the use of Arch Linux when I came across this Slicehost blog entry that announces support for it.
While Arch may be great, my initial concern is that there are no Slicehost tutorials like there are for using Ubuntu (Gutsy Gibbon 7.10). I feel like as a n00b, I need to follow the trodden path until I have enough expertise to head into the woods without a guide.
I'm going to follow the peepcode tutorial on using deprec (deployment recipes for capistrano)
is recommended for app deployment. (I normally do
everything manually, since I like to know what is actually going on
before I trust things to a set of scripts. But I'm going to follow these instructions for now, then perhaps get a little more adventurous.)
While I was downloading Ubuntu, I followed the first step I was supposed to take on my development machine (OS X). Now, I have a fairly clean box, having only installed the latest Ruby and Gems components. The peepcode tutorial doesn't mention anything about prerequisistes. The first step is:
sudo gem install deprec --include-dependencies
Since nothing ever goes smoothly, I received the following:
I found a Japanese post that has something that looks similar to this error and it suggests using '--no-rdoc', which I add to the install command and rerun it. It then appears that everything is installed correctly. (Perhaps Matz is already aware of it?)
Successfully installed rake-0.8.1
Successfully installed needle-1.3.0
Successfully installed net-ssh-1.1.2
Successfully installed net-sftp-1.1.0
Successfully installed capistrano-1.4.1
Successfully installed deprec-1.9.2
6 gems installed
Installing ri documentation for rake-0.8.1...
Installing ri documentation for needle-1.3.0...
Installing ri documentation for net-ssh-1.1.2...
ERROR: While executing gem ... (ArgumentError)
invalid mbstring sequence
During the installation of Ubuntu, I didn't have a proper internet connection at the time and received a warning about its inability to update the security settings. I'll have to check into that later, I guess.
After restarting Ubuntu, I followed the VMWare suggestion of installing the VMWare Tools. I followed the instructions I found here. Just to be safe, I restarted.
I had cause today to look into Rails VPS hosting services. I came across the Nuby on Rails article with a ton of comments which serve to validate and clarify various points. More searching turned up similar reviews. There is even a Rails-specific hosting info site.
Slicehost appears to be the best choice for my needs (a small, mainly static Rails app). The minimum plan is $20/mo for 256MB RAM, 10GB space, 100GB bandwidth. This is all way more than I actually need.
I'm trying to understand the hosting options before I get going on my development effort. I'd like for my dev setup to be as close as possible to my deployed/hosted setup. I'll be using VMWare on my MacBook Pro for this purpose. (I'm not going to be fussing with IronRuby for this project.)
After reading more about Ruby development on the Mac, especially about RubyCocoa, I just couldn't stand not having enough control over my system to install the latest-and-greatest bits.
My goal: install Ruby 1.9 on Leopard. (I don't particularly care about Rails at this point.)
The standard resource for this is Hivelogic. Unfortunately, it is not up-to-date (despite promises to make it so).
I created a ~/.bash_login (using Textmate), in which I added the line:
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
I created the path he suggests for managing our source code:
sudo mkdir -p /usr/local/src
sudo chgrp admin /usr/local/src
sudo chmod -R 775 /usr/local/src
cd /usr/local/src
Next, I did a little reading on the use of readline 5.2. His instructions call for using the 5.1 bits, but those are not the latest. It turns out, there are a few problems.
I downloaded the latest version:
curl -O ftp://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz
tar xzvf readline-5.2.tar.gz
cd readline-5.2
I next applied the patch to support/shobj-conf (I just did this manually --- it only really consists of adding a '9' to two places):
+darwin89*)
+ darwin[789]*) SHOBJ_LDFLAGS=''
Now, there is also discussion of the need to compile readline statically due to a problem with GCC. But, OSX 10.5.2 was just released, so I upgraded and ignored the static business and proceeded to compile per the original Hive instructions:
./configure --prefix=/usr/local
make
sudo make install
cd ..
Everything seemed to go smoothly. Well, at least I didn't get the usual error message pre-10.5.2. I did, however, receive a few cryptic messages during make:
install: you may need to run ldconfig
ldconfig apparently updates links and caches for newly installed libraries. After a little research, it also appears that this can be ignored. I'm not so sure, but I'm not sure how to validate my build of readline. The libs all appear in usr/local/libs, so we'll see...
The modified Hive instructions are:
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-0.tar.gz
tar xzvf ruby-1.9.0-0.tar.gz
cd ruby-1.9.0-0
./configure --prefix=/usr/local --enable-pthread --with-readline-dir=/usr/local --enable-shared
make
sudo make install
sudo make install-doc
cd ..
The result of ruby -v (from the src directory, since this also reveals whether or not the PATH is properly configured) is:
ruby 1.9.0 (2007-12-25 revision 14709) [i686-darwin9.2.0]
Yay!
I couldn't find anyway to verify which version of readline is being used, but irb works just fine, including statement completion:
irb --readline -r irb/completion
Next up, RubyGems. Using (modified) Hivemind instructions:
curl -O http://files.rubyforge.mmmultiworks.com/rubygems/rubygems-1.0.1.tgz
tar xzvf rubygems-1.0.1.tgz
cd rubygems-1.0.1
sudo /usr/local/bin/ruby setup.rb
cd ..
The result of gem -v results in:
1.0.1
Yay! I tried a few more gems commands (environment, list), and all seems right.
Well, it appears that everything is setup properly. Now it is time to get to developing some things...
Ruby is now an official part of Leopard. Well, it seems more complicated than that. It seems that there are difficulties updating the gems, since the gem system installed by default in Leopard is 0.94 (gem -v) and gems isn't Leopard-aware until 0.95. It is now at 1.0. Lots of workarounds have been suggested.
I'm not going to bother with all that right now. The defaults should be sufficient for my immediate purposes.
Dude, it worked for me too! read more
on IronRuby