<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Paul Moser &#187; Ubuntu</title>
	<atom:link href="http://blog.paulmoser.co.uk/index.php/category/linux/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.paulmoser.co.uk</link>
	<description>So much to learn but so little time</description>
	<lastBuildDate>Thu, 17 Sep 2009 21:28:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ruby-on-Rails on Ubuntu 8.04</title>
		<link>http://blog.paulmoser.co.uk/index.php/2008/10/31/ruby-on-rails-on-ubuntu-804/</link>
		<comments>http://blog.paulmoser.co.uk/index.php/2008/10/31/ruby-on-rails-on-ubuntu-804/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 12:59:56 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ruby-on-Rails]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.paulmoser.co.uk/index.php/2008/10/31/ruby-on-rails-on-ubuntu-804/</guid>
		<description><![CDATA[Every time I build an Ubuntu machine I have to figure out all over again how to get it to work &#8211; so this time I&#8217;ll write the steps down!
Install the packages: postgresql, rake, ruby, rubygems, rcov, git-core
Update the RubgyGems distribution by running

sudo gem update --system

If you run gem now  you&#8217;ll get the nasty [...]]]></description>
			<content:encoded><![CDATA[<p>Every time I build an Ubuntu machine I have to figure out all over again how to get it to work &#8211; so this time I&#8217;ll write the steps down!</p>
<p>Install the packages: postgresql, rake, ruby, rubygems, rcov, git-core</p>
<p>Update the RubgyGems distribution by running<br />
<code><br />
sudo gem update --system<br />
</code></p>
<p>If you run gem now  you&#8217;ll get the nasty looking error:<br />
<code><br />
/usr/bin/gem:10:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009<br />
/usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)<br />
</code></p>
<p>You need to edit /usr/bin/gem and add an extra require:<br />
<code><br />
require 'rubygems/gem_runner'<br />
</code></p>
<p>Install the Postgres driver:<br />
<code><br />
sudo gem install postgres-pr<br />
</code></p>
<p>You&#8217;ll need to change where  Postgres writes it&#8217;s socket file, if you leave things unchanged you&#8217;ll see the error:<br />
<code><br />
No such file or directory - /tmp/.s.PGSQL.5432<br />
</code></p>
<p>when attempting to connect to the database. </p>
<p>Edit <code>/etc/postgresql/8.3/main/postgresql.conf</code> and alter the unix_socket_directory parameter:<br />
<code><br />
unix_socket_directory = '/tmp'<br />
</code></p>
<p>Restart Postgres using the init script /etc/init.d/postgresql-8.3</p>
<p>You should be able to leave your pg_hba.conf file unchanged &#8211; it should already look like:</p>
<p><code><br />
# Database administrative login by UNIX sockets<br />
local    all         postgres                          ident sameuser<br />
# "local" is for Unix domain socket connections only<br />
local    all         all                               ident sameuser<br />
# IPv4 local connections:<br />
host    all         all         127.0.0.1/32          md5<br />
# IPv6 local connections:<br />
host    all         all         ::1/128               md5<br />
</code></p>
<p>You need to create a database user, and give that user a password and create a database. As the postgres user:<br />
<code><br />
createuser  -lqs db_username<br />
createdb -O db_username db_name<br />
psql -c "alter user db_username with password 'db_password';"<br />
</code><br />
In the last command above make sure you don&#8217;t miss the &#8216;;&#8217; character, if you miss it the statement isn&#8217;t actually executed, you should see the command confirmed with ALTER ROLE.</p>
<p>In you Rails application database.yml you need to specify the database name, database username and password and the host (even if it&#8217;s localhost)<br />
<code><br />
development:<br />
  adapter: postgresql<br />
  encoding: unicode<br />
  database: db_name<br />
  host: localhost<br />
  username: db_username<br />
  password: db_password<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.paulmoser.co.uk/index.php/2008/10/31/ruby-on-rails-on-ubuntu-804/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>White screen after login to X on Linux (Ubuntu)</title>
		<link>http://blog.paulmoser.co.uk/index.php/2008/10/31/white-screen-after-login-to-x-on-linux-ubuntu/</link>
		<comments>http://blog.paulmoser.co.uk/index.php/2008/10/31/white-screen-after-login-to-x-on-linux-ubuntu/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 12:59:27 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.paulmoser.co.uk/index.php/2008/10/31/white-screen-after-login-to-x-on-linux-ubuntu/</guid>
		<description><![CDATA[Given it&#8217;s taken me a while to sort this I thought I&#8217;d write down what I did in case it helps someone else (it might help me again in the future too, I&#8217;m sure if it happens again I won&#8217;t remember what I did to fix it)
So yesterday I installed VirtualBox 2.0, removed VirtualBox 1.5.x [...]]]></description>
			<content:encoded><![CDATA[<p>Given it&#8217;s taken me a while to sort this I thought I&#8217;d write down what I did in case it helps someone else (it might help me again in the future too, I&#8217;m sure if it happens again I won&#8217;t remember what I did to fix it)</p>
<p>So yesterday I installed VirtualBox 2.0, removed VirtualBox 1.5.x OSE and its related dependencies, and probably installed a whole load of updates too &#8211; I really can&#8217;t remember exactly what I did &#8211; at the time it all worked fine but after I switched the machine back on today and logged in I don&#8217;t see my desktop just a white screen and the mouse cursor.</p>
<p>Hitting ctrl-alt-F1 gets me to a command shell, so the machine hasn&#8217;t locked up. </p>
<p>From struggling to get my ATI based card to work in the past I know that <code>dpkg-reconfigure xserver-org</code> reverts X to a very basic configuration so I tried that from the shell and then rebooted. <code>dpkg-reconfigure xserver-org</code> obviously had an effect as the screen resolution of the login screen dropped down but I still got the white screen.</p>
<p>Rebooting again and choosing the recovery option from the bootloader prompt I chose the &#8220;Try to fix X server&#8221; menu option &#8211; *try* to fix X &#8211; I like that although I didn&#8217;t find it funny at the time. Reboot, login in &#8211; still a white screen.</p>
<p>A Google search from another machine threw up suggestions to remove the likes of<br />
<code><br />
~/.config/compiz<br />
~/.gconf/apps/compiz<br />
</code><br />
This didn&#8217;t help either, but thinking about it it may have done if I&#8217;d gone about things differently. X obviously isn&#8217;t completely broken as you can get the login screen and a safe session (see later) also works fully. I think only removing the above directories (i.e. not doing any of the above dpkg-reconfigure etc stuff) may have worked if I&#8217;d been in safe mode when I removed them, as it was X was running and I used ctrl-alt-F1 to get a shell. I suspect that when I issued the reboot command and X shut down it just rewrote the files with the same values in them.</p>
<p>Finally I stumbled on a <a href="http://jwylie.blogspot.com/2008/07/ubuntu-804-on-my-thinkpad-t60p-part-5.html">blog post</a>. I did something similar, logged in using  a &#8220;Gnome FailSafe&#8221; session, reinstalled the ATI drivers &#8211; I just downloaded them from http://ati.amd.com/support/drivers/linux/linux-radeon.html rather than using EnvyNG &#8211; and re-enabled the proprietary drivers under &#8220;System -> Administration -> Hardware Drivers&#8221; menu (which if I hadn&#8217;t run <code>dpkg-reconfigure xserver-org</code> in the first place I might not have needed to do), rebooted and everything was ok.</p>
<p>If nothing else a &#8220;Gnome FailSafe&#8221; session is your friend, at least you can get online to find answers.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.paulmoser.co.uk/index.php/2008/10/31/white-screen-after-login-to-x-on-linux-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
