• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Noulakaz

Noulakaz

The blog of Avinash, Christina, Anya and Kyan Meetoo.

  • Home
  • About
  • People
    • Christina & Avinash Meetoo
    • Avinash Meetoo
    • Christina Meetoo
    • Anya Meetoo
    • Kyan Meetoo
  • General
    • News
    • Mauritius
    • Politics
    • Education
    • Business
    • Travel
  • Computing
    • Apple
    • Linux
    • LUGM
    • Programming
    • Web
    • Technology
    • Knowledge Seven
  • Entertainment
    • Music
    • Movies
    • Photography
    • Sports

Technology

The Zune has wired wireless

23 November 2007 By Avinash Meetoo 10 Comments

Sorry. I can’t resist:

Today’s Zunes claim to uniquely provide wireless sync, but they require being plugged in order to do this! That means Microsoft’s wireless sync has as many wires as Apple’s USB sync, it’s just 20 times slower. That’s not an advantage nor a feature. It’s a marketing lie.

According to this informative article, this is one of the reasons why the Microsoft Zune is still failing compared to the Apple iPod.

Filed Under: Apple, Technology

Installing the latest Rubygems and Rails on Slicehost

21 November 2007 By Avinash Meetoo 6 Comments

As you know, I now have my own virtual private server hosted at Slicehost and on which I’ve installed the latest Ubuntu 7.10 Gutsy Gibbon.

The main reason why I’ve changed my hosting company is that I want to have fun with Ruby on Rails and Ruby technologies in general.

Installing the infrastructure to run Ruby on Rails applications is not difficult but there are some steps which are not trivial. Here is a rundown of what I did to get my first Ruby on Rails application working online.

1 – Ruby and Rubygems

The server edition of Ubuntu does not install Ruby and the Ruby package manager (called Rubygems) out of the box. I did:

$ aptitude install ruby
$ aptitude install rubygems

This installs Ruby 1.8.6 and a relatively troublesome version 0.9.4 of Rubygems that needs to be updated as quickly as possible to a newer version. The reason is that this old version of Rubygems uses too much memory and will fail on my 256Mb slice! To install the new version (0.9.5), I did:

$ gem update --system --source http://segment7.net/
$ gem update --system --source http://segment7.net/

This installs a beta version (0.9.4.7) of Rubygems which works well when memory is limited. Notice that I typed that line twice. It failed the first time but succeeded the second time. Your mileage will, of course, vary. I then did:

gem update --system

and, voilà, the latest Rubygems (0.9.5) is installed. As a confirmation, here is what I now have:

$ gem env

RubyGems Environment:
- RUBYGEMS VERSION: 0.9.5 (0.9.5)
- RUBY VERSION: 1.8.6 (2007-06-07 patchlevel 36) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org

The most important information is the :bulk_threshold => 1000 which indicates that Rubygems will limit its memory consumption to 1000 units (kb?) which rocks! Now, everything can be installed without exceeding the memory of the server.

2 – Ruby on Rails and Mongrel

Now that Ruby and Rubygems work well, it’s high time to install Ruby on Rails and its friend, Mongrel.

Mongrel is (I quote once more) “a fast HTTP library and server for Ruby that is intended for hosting Ruby web applications”.

Before installing those two Ruby gems (which is what Rubygems call an add-on package), I did:

$ aptitude install build-essential
$ aptitude install ruby1.8-dev

build-essential contains a C/C++ compiler which is crucial when installing some gems because, well, some of them are written in C/C++… Furthermore, ruby1.8-dev contains some essential tools when are required for installing gems. Both are important because gems are downloaded in source format (in either C/C++ or Ruby) and need to go through a number of steps before actually being installed.

I installed Ruby on Rails and friends with:

$ gem install rails
$ gem install mongrel
$ gem install mongrel_cluster

3 – Testing Ruby on Rails and Mongrel

I then created a skeleton Ruby on Rails application:

$ cd
$ rails test
$ cd test

and I launched a Mongrel instance on port 81 (because I can’t access my server from my client if the default port of 3000 is used…) with:

$ ruby script/server -p 81

and the result I got was:

=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:81
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:81
** Starting Rails with development environment...
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart).
** Rails signals registered. HUP => reload (without restart). It might not work well.
** Mongrel 1.1.1 available at 0.0.0.0:81
** Use CTRL-C to stop.

which felt like music to my ears.

I’ve stopped the server since. So you won’t be able to connect to it. But for your own enjoyment, feel free to stare on the above screenshot :-)

Conclusion

The process is easy and well documented elsewhere. Except for the bloody Rubygems issue which forced me to hard_reboot my VPS for the first time in its (short) life.

Next time, I’ll write something on using Capistrano to deploy a Ruby on Rails application automatically.

Filed Under: Linux, Programming, Technology, Web

Noulakaz.net on Slicehost

17 November 2007 By Avinash Meetoo 22 Comments

Did you notice that my weblog is not hosted at Icdsoft anymore? I have moved to a shiny virtual private server courtesy of Slicehost which uses virtualization to run multiple operating systems (hence multiple VPS) on the same server.

I first heard of Slicehost about two months ago when looking for a hosting company supporting Ruby on Rails (which unfortunately Icdsoft isn’t). Their VPS plan includes (I quote):

  • Full root access and rebooting – I am a fan of SSH (and SCP) and I loved the idea of getting access (as root) to the command line and do everything I want on a box found in the US…
  • Choice of Linux distro – Either Ubuntu (Dapper Drake or Gutsy Gibbon), Debian, Fedora, Centos or Gentoo. I thought a lot about this and settled for Gutsy Gibbon. Sure it’s new but most people using Slicehost use Ubuntu and many have upgraded and had had not problem whatsoever. Moreover, I use Gutsy Gibbon at home…
  • Dedicated IP address and Tier-1 redundant bandwidth – My own IP address! Too great. This opens the door to all kinds of tricks like having multiple domains pointing to the same box. I’m sure I’ll get some additional domains very shortly. As for the bandwidth, it’s great to be able to do a “aptitude install apache2” and have apache running under 5 seconds. Those in the US are spoilt kids :-)
  • RAID1 disk storage – No need to do backup (even though it can be done) as RAID1 uses mirroring and, in case of a faulty hard disk, the people at Slicehost naturally replace it. Some people backup the Slicehost data on Amazon S3 just to be sure. I’ll investigate.
  • Reserved RAM slice – I have chosen the simplest (and cheapest) plan which gives me 256Mb of RAM. Now, before you run away shouting “What can we do with 256Mb in 2007!!!”, notice that we are speaking of a server without X-Window here. Aha! Now you understand.
  • Guaranteed CPU slice and more when available – I have a dedicated CPU slice (in the scheduler sense) and I am currently using only 4% of it for my weblog. This means that I can have lots and lots of new applications (written using Ruby on Rails or Java, whatever) and I won’t even use all my CPU slice. For your information, my weblog now runs on a server with 4 AMD Opteron 2212 HE Dual-Core processors i.e. 8 cores! Now, you understand why I have been teaching Concurrency and Parallelism for the past three years…
  • Bootable rescue mode – in case I screw up.
  • Unlimited environments: Ruby on Rails, Python, Java and more – and this is the reason I have moved to Slicehost. I love programming. And I love programming languages. Unfortunately, most hosting companies are very PHP-centric. I really want to experiment with frameworks like Ruby on Rails, Django, Spring, Seaside, Lift, etc. Now I have no excuse.

Two (small) glitches

First of all, they don’t accept customers if they feel they don’t have the hardware resources. In that case, you are put on a waiting list and they order new hardware. That why I had to wait two months to move to Slicehost. Now, this “glitch” is also a benefit in the sense that you know that everything will be great once you are accepted.

The second glitch is the price. The smallest hosting plan called 256slice (with 256MB of RAM, 10GB of HD space and 100GB of monthly transfer) is $20 per month. Now, this is mostly negligible for an American or a company but not for me.

I’ve managed to convince Christina that this is worthwhile for two reasons:

  1. Self-education. A new server to manage. New frameworks to learn. This is going to be tough but good… and perhaps valuable for the future. Who knows?
  2. New opportunities. It is perfectly possible that Christina and I develop a new Ruby on Rails application we have been talking a lot on lately. We will use Adsense, at least to cover our expenses. I know this feels like vaporware but stay tuned…

Filed Under: Linux, News, Programming, Technology, Web

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 79
  • Page 80
  • Page 81
  • Page 82
  • Page 83
  • Interim pages omitted …
  • Page 139
  • Go to Next Page »

Primary Sidebar

Our Personal Websites

Avinash Meetoo
Christina Meetoo
Anya Meetoo
Kyan Meetoo

Archives

  • May 2025 (2)
  • April 2025 (4)
  • January 2025 (3)
  • December 2024 (2)
  • November 2024 (2)
  • October 2024 (3)
  • September 2024 (7)
  • August 2024 (1)
  • July 2024 (1)
  • June 2024 (2)
  • May 2024 (3)
  • January 2024 (2)
  • December 2023 (1)
  • October 2023 (1)
  • September 2023 (4)
  • August 2023 (3)
  • July 2023 (1)
  • June 2023 (4)
  • May 2023 (1)
  • April 2023 (1)
  • March 2023 (5)
  • February 2023 (1)
  • December 2022 (1)
  • November 2022 (1)
  • October 2022 (4)
  • August 2022 (4)
  • July 2022 (3)
  • June 2022 (5)
  • May 2022 (5)
  • January 2022 (3)
  • December 2021 (2)
  • November 2021 (1)
  • October 2021 (1)
  • September 2021 (4)
  • August 2021 (2)
  • July 2021 (14)
  • May 2021 (2)
  • April 2021 (4)
  • March 2021 (9)
  • February 2021 (2)
  • January 2021 (1)
  • October 2020 (1)
  • September 2020 (1)
  • August 2020 (2)
  • July 2020 (5)
  • June 2020 (3)
  • May 2020 (5)
  • April 2020 (6)
  • March 2020 (2)
  • February 2020 (2)
  • January 2020 (2)
  • October 2019 (1)
  • September 2019 (2)
  • July 2019 (2)
  • June 2019 (1)
  • May 2019 (3)
  • April 2019 (2)
  • March 2019 (1)
  • February 2019 (1)
  • January 2019 (3)
  • December 2018 (1)
  • October 2018 (3)
  • August 2018 (2)
  • July 2018 (2)
  • June 2018 (1)
  • May 2018 (2)
  • April 2018 (1)
  • February 2018 (1)
  • December 2017 (1)
  • October 2017 (1)
  • September 2017 (1)
  • August 2017 (1)
  • July 2017 (1)
  • May 2017 (4)
  • April 2017 (3)
  • March 2017 (4)
  • February 2017 (5)
  • January 2017 (3)
  • October 2016 (1)
  • September 2016 (1)
  • August 2016 (4)
  • July 2016 (1)
  • June 2016 (1)
  • March 2016 (3)
  • February 2016 (3)
  • January 2016 (1)
  • December 2015 (1)
  • November 2015 (2)
  • September 2015 (1)
  • August 2015 (3)
  • March 2015 (1)
  • December 2014 (1)
  • November 2014 (4)
  • October 2014 (1)
  • March 2014 (2)
  • February 2014 (3)
  • December 2013 (1)
  • October 2013 (1)
  • September 2013 (1)
  • August 2013 (1)
  • July 2013 (1)
  • June 2013 (2)
  • May 2013 (1)
  • March 2013 (3)
  • January 2013 (2)
  • December 2012 (3)
  • November 2012 (4)
  • September 2012 (3)
  • August 2012 (2)
  • July 2012 (3)
  • June 2012 (2)
  • May 2012 (1)
  • April 2012 (2)
  • February 2012 (1)
  • January 2012 (4)
  • December 2011 (2)
  • November 2011 (1)
  • October 2011 (4)
  • September 2011 (2)
  • August 2011 (1)
  • July 2011 (2)
  • June 2011 (4)
  • April 2011 (7)
  • March 2011 (2)
  • February 2011 (1)
  • January 2011 (3)
  • November 2010 (3)
  • October 2010 (1)
  • September 2010 (2)
  • August 2010 (4)
  • July 2010 (2)
  • June 2010 (1)
  • May 2010 (3)
  • April 2010 (4)
  • March 2010 (3)
  • February 2010 (3)
  • January 2010 (5)
  • December 2009 (2)
  • November 2009 (3)
  • October 2009 (1)
  • September 2009 (5)
  • August 2009 (3)
  • July 2009 (1)
  • June 2009 (3)
  • May 2009 (2)
  • April 2009 (7)
  • March 2009 (12)
  • February 2009 (10)
  • January 2009 (5)
  • December 2008 (4)
  • November 2008 (11)
  • October 2008 (6)
  • September 2008 (7)
  • August 2008 (3)
  • July 2008 (8)
  • June 2008 (6)
  • May 2008 (5)
  • April 2008 (7)
  • March 2008 (6)
  • February 2008 (3)
  • January 2008 (6)
  • December 2007 (11)
  • November 2007 (10)
  • October 2007 (7)
  • September 2007 (9)
  • August 2007 (3)
  • July 2007 (7)
  • June 2007 (8)
  • May 2007 (14)
  • April 2007 (11)
  • March 2007 (18)
  • February 2007 (14)
  • January 2007 (15)
  • December 2006 (16)
  • November 2006 (10)
  • October 2006 (7)
  • September 2006 (8)
  • August 2006 (8)
  • July 2006 (6)
  • June 2006 (4)
  • May 2006 (13)
  • April 2006 (10)
  • March 2006 (11)
  • February 2006 (7)
  • January 2006 (14)
  • December 2005 (8)
  • November 2005 (6)
  • October 2005 (7)
  • September 2005 (2)
  • August 2005 (6)
  • July 2005 (2)
  • June 2005 (6)
  • May 2005 (15)
  • April 2005 (12)
  • March 2005 (3)
  • February 2005 (8)
  • January 2005 (3)
  • December 2004 (1)
  • November 2004 (2)
  • October 2004 (2)
  • September 2004 (3)
  • August 2004 (3)
  • July 2004 (3)
  • June 2004 (3)
  • May 2004 (6)
  • April 2004 (10)
  • March 2004 (12)
Creative Commons License This work is licensed by Avinash Meetoo under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Unported License.