Showing posts with label acer. Show all posts
Showing posts with label acer. Show all posts

Monday, November 1, 2010

Ubuntu 10.04 upgrade on Acer netbook: Ruby Version Manager and Ruby 1.9.2

Previous: Ubuntu 10.04 upgrade on Acer netbook: Adobe Flash Player

The things I had done so far on the Acer did not tell me much about how 10.04 would play on the Toshiba. I was leery of 5100 AGN support, and the Adobe Flash Player for 64-bit Linux was still in a pre-release state.

Installing software development tools ought to be less problematic than all that. I found that many people were singing the praises of Ruby Version Manager (rvm). It gives you the ability to run multiple releases of ruby on the same machine without having to uninstall and install different releases. It sounded useful, and most of the comments online were very positive.

Following advice on http://web2linux.com/installing-rails-3-on-ubuntu-10-04-lucid-lynx/, I began by installing prerequisites to rvm and ruby:
apt-get install
curl
git-core
build-essential
zlib1g-dev
libssl-dev
libreadline5-dev
I then proceeded to make a series of noob mistakes, and after cleaning off various partial and incorrect installs, this is how I got rvm working. The official installation instructions at http://rvm.beginrescueend.com/rvm/install/ are pretty good, but are not exactly right.

The installation instructions mention three options — install as user, install as root, and system-wide install. I wanted to install as user so that everything would be under /home. That makes it easier to upgrade Ubuntu, since I can restore /home from a backup after doing the basic install. That was my plan for the Toshiba, anyway. For the Acer, I just blew everything away and installed fresh.

First step was to use curl to get the latest version of rvm from head:
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
This step appeared to work. The author, Wayne Seguin, kindly included the following advice in the console output: "Be sure to get head often as rvm development happens fast." Sound advice.

They suggest running
rvm notes
to install dependencies, but in fact it only displays a description of dependencies.

They say you must not have any returns in .bashrc. They specifically call out a line in Unbuntu's .bashrc:
[ -z "$PS1" ] && return
and they recommend wrapping this in an if structure so that rvm will work correctly. I found that after completing the rest of the installation steps, rvm never worked. It turned out that this change is required only for the installation process, and once rvm has been installed you should reinstate the original statement. I changed it to
if [[ -n "$PS1" ]] ; then
return
fi
and afterwards changed it back to
[ -z "$PS1" ] & return
The installation instructions also say to put this line at the end of .bashrc:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
They then say you have to run
source ~/.rvm/scripts/rvm
the first time you use rvm. In fact, you have to run this command every time you want to use rvm. I added the source command to the end of .bashrc, and rvm now works properly.

The other thing to be aware of is that the installation instructions say you run
type rvm | head -n1
and it should display
rvm is a function
Then, you run the source command for the first time. In fact, that results in
rvm is hashed (/usr/local/bin/rvm)
You have to run the source command first, and then rvm will be a function.

Finally rvm was working. I used it to install ruby 1.9.2:
rvm install 1.9.2
and then to make 1.9.2 the default version of ruby (as far as rvm was concerned, anyway):
rvm --default 1.9.2
Good news: It installed rubygems automatically.

Now I could install other gems and run ruby to my heart's content, but only when running as 'user'.

Next: Ubuntu 10.04 upgrade on Acer netbook: Instiki migration

Ubuntu 10.04 upgrade on Acer netbook: Adobe Flash Player

Previous: Ubuntu 10.04 upgrade on Acer netbook: Basic install

I went to YouTube and chose a video at random from the default page. As expected, it prompted me to install the Adobe Flash Player. I clicked on the Adobe link and it took me to the Adobe download page, as expected. There was a 32-bit Linux download for APT, so I chose it. It prompted me to enable the 10.04 Partner Channel. This enables downloads of non-free software for Linux. You must enable this to download the Flash Player. After that, it prompted me for my root password.

After a rather long wait, during which the system gave no indication that anything was happening, I was prompted with the Install Additional Software? dialog, asking Do you want to install package 'adobe-flashplugin'? I chose Install, and the installation appeared to work fine. When I tried the YouTube video again, it prompted me again to download the Flash Player, as if it couldn't find the one I had just installed. This time, I clicked on the Install Additional Plugins link instead of the Install Adobe FlashPlayer link.

This time, I got a list of available plugins. I highlighted Adobe Flash Player (installer) and clicked Next. That brought up the Install Additional Software? dialog, asking Do you want to install package 'flashplugin-installer'? I clicked Install. It removed the adobe-flashplugin package I had just installed, and installed flashplugin-installer. This took a long time. The installation appeared to work.

Now I was able to play YouTube videos.

So, the key to success here is to use the Install Additional Plugins link instead of the direct link to Adobe.

Next: Ubuntu 10.04 upgrade on Acer netbook: Ruby Version Manager and 1.9.2

Ubuntu 10.04 upgrade on Acer netbook: Basic install

Previous: Border around images in OpenOfficeImpress

Time for me, a not-on-the-bleeding-edge user, to upgrade to Ubuntu 10.04. I had problems using 9.10 on my Toshiba laptop due to problems in support for the Intel 5100 AGN wireless adapter. Various bugs were reported regarding Linux support for that product. I've been running 9.04 on the Toshiba and 9.10 on the Acer netbook. Oddly, 9.04 supports the 5100 AGN just fine, while later releases do not.

The Toshiba is my main workhorse, and I use the Acer for presentations and meetings as well as a host for a Windows XP instance that I need for two particular applications. Because it's easy to install Ubuntu alongside Windows using Wubi, I decided to approach the upgrade cautiously by installing on the Acer first. My thought was this would minimize the risk of messing up my primary machine. This approach would not tell me whether 10.04 supported the 5100 AGN wireless adapter, or whether it would be possible to get the 64-bit version of Adobe Flash Player working, but it would at least identify any major issues with the new release.

The Wubi install is different from a straight install from an iso disk. I booted into Windows XP, downloaded the Wubi installer, and ran it with
wubi --32bit
The installer recognized that Ubuntu was already installed and offered to remove it. I chose Yes, the installer removed Ubuntu 9.10, and exited. I ran the command a second time, exactly the same way, and this time it downloaded the installation files and proceeded with the installation. This took quite a while, but completed without any problems.

The first thing I noticed was that it was hard for me to read the display and to distinguish the edges of windows. It seems the default desktop theme for 10.04, Ambiance, is based on a color palette of black, dark black, deep black, and pitch black. I changed the desktop theme to Radiance, which has a lighter color palette. The default on 9.04, Human, was not listed as an option. Radiance is similar.

Now that I could read the display, the next order of business was to slow down the mouse a bit. By default, 10.04 ships with the mouse set to very fast and very sensitive; that is, the sliders are about half-way between minimum and maximum. I changed the settings to be more compatible with my slow, old hands, after some difficulty in making the mouse cursor land where I wanted it.

The next thing I noticed was that .bash_aliases is called by default from .bashrc. In 9.04, those lines are commented out by default in .bashrc. I think the 10.04 default makes more sense. I put some of my favorite aliases into .bash_aliases and began to check out the new version of Ubuntu.

Next: Ubuntu 10.04 upgrade on Acer netbook: Adobe Flash Player

Sunday, November 15, 2009

Installing Wubi on Acer Netbook

Previous: Firefox addon toolbar buttons not displayed

I've been using my Toshiba Satellite as my main workhorse, and my Acer Netbook as a system for running presentations at conferences and user group meetings and for clients. I took only the Acer with me on a business trip recently, and I became quite frustrated with using Windows XP all the time, rather than just for running presentations. Besides that, I missed having the usual tools available. I decided to load Ubuntu Linux on the Acer so I would have similar environments on both machines, and to avoid the hassle of using Windows.

I have a conventional dual-boot setup on the Toshiba. For the Acer, I decided to try Wubi, a program for Microsoft Windows that manages an Ubuntu dual boot for you, without your having to repartition the hard drive manually. I wanted to see how the user experience compares with the conventional dual boot setup.

Wubi install



First, I went to http://wubi-installer.org/ and downloaded the Wubi installer.

Next, I started Windows XP on the Acer and ran the installer, following the prompts as needed. Everything went smoothly.

After rebooting into Ubuntu Linux, Wubi copied the basic installation files and set up its pseudo partition. It installed 9.10 Karmic.

Making Ubuntu the default OS on boot



By default, Wubi has Windows as the default OS. To change that, here is what I did:

1. Boot into Windows XP.

2. Go to Control Panel

3. Switch to Classic View

4. Choose: System -> Advanced -> Startup and Recovery

5. From "Default Operating System" drop-down list, choose "Ubuntu"

6. Click OK on all open dialog windows to close them

Ubuntu upgrade



From there, I followed my own instructions for updating the system and loading the various programs I use, starting with this blog post: http://kotowanandesu.blogspot.com/2009/08/updating-ubuntu.html. The system upgrade went smoothly.

Ruby development support



The next step was to install support for ruby development. I followed the steps I had documented previously in this post: http://kotowanandesu.blogspot.com/2009/08/installing-support-for-ruby.html.

Things had changed a bit since I installed 9.04. Here are the differences I encountered:

1. When I ran the command
sudo apt-get install libmysql-ruby libmysqlclient-dev
the virtual package name libmysqlclient-dev was resolved automatically and the correct components were installed without the need for any additional action on my part.

2. When I installed the ruby bindings for MySQL, the software installed correctly but the ri documentation was missing a lot of bits and pieces. I did not consider this a serious problem.

3. The menu option Applications -> Add/Remove Applications was replaced by Ubuntu Software Center. I discovered that when I started to type the name of an application into the search box, it auto-filled all matching names. This was faster than the old way of finding the packages I wanted.

No problems with the rest of the ruby-related stuff, except some of the ri docs for nokogiri were missing. For the scripts and aliases documented in the original blog post, I just copied the files from the Toshiba laptop.

Java development support



I followed the instructions I had documented earlier in this post: http://kotowanandesu.blogspot.com/2009/08/installing-support-for-java.html. Everything worked the same as the first time, with the following exceptions:

1. Eclipse Galileo was installed by default. No additional steps were needed on my part.

2. Previously, Eclipse installed with a default value for the classpath variable M2_REPO. This time, it had no default definition. In Eclipse, under Window -> Preferences -> Java -> Build Path -> Classpath Variables, I added M2_REPO to point to /home/dave/.m2.

3. This time, migrating my existing projects to the new instance of Ubuntu was easier, since I was copying them from another Ubuntu instance that was configured in the same way. The first time around, I copied project files from an OS X system that was configured a bit differently.

Tomcat install



I had some difficulty with the standard installation procedure the first time around, as described in this post: http://kotowanandesu.blogspot.com/2009/08/installing-tomcat.html. This time, I checked for updated documentation and found this information about installing Tomcat 6 on Ubuntu 9.10: https://help.ubuntu.com/9.10/serverguide/C/tomcat.html. Per that documentation, I ran the command
sudo apt-get install tomcat6
and the It Works! page came up fine.

ColdFusion install



I skipped the ColdFusion installation for the moment, since I wouldn't need it in the near future.

.NET support



As before (see http://kotowanandesu.blogspot.com/2009/08/installing-support-for-net.html), I entered the command
sudo apt-get install mono-devel


To install the IDE, used Ubuntu Software Center, and then found it under Applications -> Programming. Go figure. I didn't try the Hello, World! programs this time, because I'm confident in the package.

The NUnit and debugger installs went smoothly.

Git install



The git install went smoothly, as documented here: http://kotowanandesu.blogspot.com/2009/08/installing-git.html.

eXPlainPMT install



I skipped this install, since I've started using the Kanban approach rather than the iterative approach on personal development projects.

Firefox development add-ons



I skipped this, since I won't be using the Acer as my primary development platform.

...and the rest of it



All that remained was to copy files from the Toshiba to the Acer. Up and running!

Next: Flash player for Firefox libnspr4-dev dependency