Rubinius 1.0 Preview - May 15th
...can't wait for this. Rubinius 1.0 Preview is, according to the following, expected on May 15th:
http://rubinius.lighthouseapp.com/projects/5089/getting-started
A web developer, architect, & aspiring RESTafarian's thoughts on software, web tech, entrepreneurial endeavors and some creative ideas. Mark's current focus is on developing elastic & RESTful Ajax applications on the Cloud with the following technologies: OO and unobtrusive JavaScript using the Prototype JS library, jQuery, and on the server side prefers to write OO code in Ruby, Rails; Amazon EC2 AS3 SimpleDB; mySQL; -- currently learning a new language each year and groking Unix
...can't wait for this. Rubinius 1.0 Preview is, according to the following, expected on May 15th:
http://rubinius.lighthouseapp.com/projects/5089/getting-started
Been researching and practicing with Rails for a little while now, and went through the process of updating my setup on my Mac book pro (Mac OS X), as well as on an Ubuntu (Dapper, 6.06) test machine (actually a test VM).
Most of this is similar to what you would find inside of "Agile Web Development with Rails" by the esteemed DHH and Dave Thomas (by the way, if you're interested in Rails development, imho, it's the best book around by far -- very comprehensive and a smooth read). It is also similar to this post by James Duncan Davidson.
So why am I posting this here? Well because in order for me to get it to work on both my Mac and on Ubuntu 6.06, I had to tweak the instructions slightly for a variety of reasons (some version upgrades, etc).
Posting this on my blog not only to share, but for my own future reference. So here goes, for both Mac OS X and Ubuntu Dapper Drake 6.06, a line by line installs of a Rails stack: Apache 2.2, mySQL5 database server, SVN, Ruby 1.8.4, Ruby Gems, Ruby Termios Library, Mongrel, Mongrel Cluster, Capistrano 2.0.
For Mac OS X on Mac Book Pro (Intel-based Mac):
# first you need to download and install DarwinPorts (now known as MacPorts) 1.5.2:For Ubuntu 6.06 VM on Mac Book Pro (Intel-based Mac):
http://darwinports.com/
# once you have MacPorts installed, you may commence with the Rails stack install...
$ sudo port install apache2
$ sudo port install mysql5 +server
$ sudo port install subversion +tools
$ sudo port install ruby
$ sudo port install rb-rubygems
$ sudo port install rb-termios
$ sudo gem install -y rake
$ sudo gem install -y rails
$ sudo gem install -y capistrano
$ sudo gem install -y mongrel
$ sudo gem install -y mongrel_cluster
$ sudo apt-get install apache2I will try and make a follow up post on Configuring Mongrel and Deploying with Capistrano 2.0, and connecting Apache to Mongrel, installing MemCacheD... but this at least gets the Rails stack installed with gems.
$ sudo apt-get install mysql-server
$ sudo apt-get install openssl libssl-dev
$ sudo apt-get install libdb4.3 libdb4.3-dev db4.3-util libdb4.3++c2 libdb4.3++-dev
$ wget http://www.shiftingheat.com/packages/subversion/subversion_1.4.0-1_i386.deb
$ sudo dpkg -i subversion_1.4.0-1_i386.deb # install ruby gems from source:
$ sudo apt-get install ruby
$ wget http://rubyforge.org/frs/download.php/17190/rubygems-0.9.2.tgz
$ tar xzvf rubygems-0.9.2.tgz
$ cd rubygems-0.9.2
$ sudo ruby setup.rb
$ sudo gem update --system
# now install 'build-essential' before installing gems:
# Compilers (and manual pages [optional])
$ sudo apt-get install build-essential manpages-dev
$ sudo apt-get install ruby1.8-dev
# now install the following RubyGems: Rake, Rails, Capistrano, Mongrel, Mongrel_cluster...:
$ sudo gem install --include-dependencies rake
$ sudo gem install --include-dependencies rails
$ sudo gem install --include-dependencies termios
$ sudo gem install --include-dependencies capistrano
$ sudo gem install --include-dependencies mongrel
# selected: 2. mongrel 1.01 (ruby), 1. fastthread 1.0 (ruby)
$ sudo gem install --include-dependencies mongrel_cluster
Posted by Mark Holton Labels: Cap2.0, Capistrano 2.0, mac book pro, mysql, Rails, ruby on rails, subversion, Ubuntu, Ubuntu 6.06
at
8:59 PM
This is the way I am possibly pointing towards for hosting of my Ajax apps developed in the [not-too-distant] future. At the very least, going to research this a good amount: running a Rails Virtual Machine (or multiple clustered VM's) on Amazon's EC2.
I am currently using AS3 not only for backups, but for cross-domain resource loading (static images and JavaScript files). The value presented by AWS's EC2 is too much to ignore when thinking about the future. It's nice to see some Rails plugins already spring up related to this, (even though EC2 is in limited Beta currently, as far as I know) and no doubt it will continue. It's going to be a fun couple of years and beyond!
Deploy Rails app on EC2 via Capistrano
http://s3.amazonaws.com/rc_files/elastic_rails.mov
http://overstimulate.com/articles/2006/08/24/amazon-does-it-again.html
http://conferences.oreillynet.com/cs/rails2007/view/e_sess/14480
http://railspikes.com/2007/4/5/rails-on-ec2
http://elasticrails.com/elasticrails/
The elasticrails.com site explains that the new version of Capistrano (v2) broke functionality of his plugin, but it's a good reference to keep an eye on as this matures.
I am pointing/researching in this direction for my independent/ out-of-work apps and can only assume many others in industry and even companies might move this way as well, given the value it presents to independent devs, as well as even companies looking to host their app(s). Reason being is one can pretty readily set up redundancy (multiple VM's, clustered) for fault tolerance, and also, you only pay by the hour it's running, and last but not least, its infinitely scalable. [ Amazon's ECC approaches infinity, at least for practical purposes :) ]
So, for example, in the case of one site that runs 12 weeks per year, for hosting, I would effectively only pay for a maximum of 24 hours * 7 days/week * 12 weeks/year * $0.10 per instance hour = $201. per year (+ data transfer @ $0.10 per GB). Since the site doesn't transfer much data beyond static images, JavaScript files, generated html, this wouldn't be much more. Now I pay about $70 * 12 mos = $840 for hosting a variety of sites, which is about what one would pay if you ran Rails on EC2 (not including data) for a full year (~ $875). But, again, the scalable nature of EC2 is key.
Posted by Mark Holton Labels: ajax, Amazon Elastic Compute Cloud, EC2, Rails, ruby on rails
at
4:03 PM
http://www.amazon.com/gp/browse.html?node=16427261
From a couple perspectives, I find it tough to beat Amazon S3 for storage of many file assets (esp web developer related file assets). The value and ease of use is very good, especially with regards to file assets that you want to reach from multiple locations and also assets that outlast a machine's lifetime (say, > 3 years). I personally much prefer to store data on a network, where I can access it from anywhere, anytime, even programatically. Likewise, Amazon handles all redundancy, all backups, etc. As a longer term goal, I would like to automate an effective rsync of some data on my local machine to my S3 repository... open to ideas there if anyone wants to post them here or email me.
For those interested (and too lazy to clink on the link above!), here are the costs as of today:
Amazon Simple Storage Service
Pricing
Storage
* $0.15 per GB-Month of storage used
Data Transfer
* $0.10 per GB - all data transfer in
* $0.18 per GB - first 10 TB / month data transfer out
* $0.16 per GB - next 40 TB / month data transfer out
* $0.13 per GB - data transfer out / month over 50 TB
Data transfer in and out refers to transfer into and out of Amazon S3.
Data transferred between Amazon S3 and Amazon EC2 is free of charge.
Requests
* $0.01 per 1,000 PUT or LIST requests
* $0.01 per 10,000 GET and all other requests*
* No charge for delete requests
Storage and bandwidth size includes all file overhead
Here is a great link related to using S3 programatically with Rails:
Building a Web Application with Ruby on Rails and Amazon S3
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=608&categoryID=55
I notice on Backpack, that the 37signals guys are using a new version of Prototype.js. I haven't had time to check the diffs, but wonder what has been added:
http://asset0.backpackit.com/javascripts/prototype.js?1181176787
Posted by Mark Holton Labels: ajax, javascript, prototype, Prototype.js, ruby on rails, web 2.0
at
2:10 PM