bloovis.com

02/24/2009 (8:32 pm)

Upgrading from Rails 2.1 to 2.2

Filed under: rails, ruby ::

I have a small project that I developed at work using Rails 2.1. After installing the latest version of Rails, 2.2.2, I had to do the following to get my project working again:

  • Edit config/environment.rb and change the value of RAILS_GEM_VERSION to ‘2.2.2′.
  • Edit config/environments/development.rb and comment out the config.action_view.cache_template_extensions line.
  • Run rake rails:upgrade. This added a new file, script/dbconsole, and modified the following files:
    • config/boot.rb
    • public/javascripts/controls.js
    • public/javascripts/dragdrop.js
    • public/javascripts/effects.js
    • public/javascripts/prototype.js

02/14/2009 (5:56 am)

Power-off fix for Linux Mint 6 / Ubuntu 8.10

Filed under: linux, linux mint, ubuntu ::

The older computer on which I installed Linux Mint recently wouldn’t power off properly after a shutdown. This used to work on Mandrake 10.2. Apparently the problem is due to the newer Linux kernels requiring ACPI by default for power management, and this machine’s BIOS doesn’t seem to provide a compatible ACPI implementation.

After the usual slogging through Google search results and numerous experiments, the fix was extremely simple: add the following line to /etc/modules:

apm power_off=1

Several forum postings I found with Google suggested other solutions, including boot parameters and commenting out lines in various configuration files, but these weren’t necessary on this machine (which uses a Biostar M7VKQ motherboard).

02/09/2009 (9:46 pm)

Fixing screen resolution in Linux Mint 6 / Ubuntu 8.10

Filed under: linux, linux mint, ubuntu ::

I installed Linux Mint on my parents’ computer today, replacing Mandrake 10.2. (Yes, grandparents can use Linux.) This older computer has a motherboard with a built-in VGA adapter by Trident, connected to an ancient CRT display with a maximum resolution of 1024×768. But for some reason, Linux Mint set the resolution to 800×600, and the Screen Resolution tool in the Control Center would not allow it to be set higher.

After some Google searching, I came across some Ubuntu forum posts that suggested various fixes that did not work, or which required programs that were not available on the live CD. Finally, the thing that worked was quite simple: I edited /etc/X11/xorg.conf, and in the “Monitor” section added the following line:

HorizSync 28 - 60

After restarting X with Ctrl-Alt-Backspace and logging back in, the Screen Resolution tool now showed a number of newly available screen resolutions, including the desired 1024×768. Apparently, the Trident display driver (or some other piece of X) wasn’t able to detect the monitor capabilities automatically (perhaps due to the monitor’s extreme antiquity), and the new line in xorg.conf provided just enough of the required information.