-
Installing MySQL gem for Ruby 1.9.x
As of this writing, the MYSQL gem cannot be installed by simply doing a GEM INSTALL with ruby 1.9.1. In order to install the gem, follow these easy steps.
First download the mysql gem from rubyforge, and unzip it:
sudo wget https://rubyforge.org/frs/download.php/51087/mysql-ruby-2.8.1.tar.gz sudo tar -xzvf mysql-ruby-2.8.1.tar.gz cd mysql-ruby-2.8.1
-
Replace Ruby 1.8.x with version 1.9.x
We recently replaced ruby 1.8.6 on a Ubuntu 8.04 Server with Ruby 1.9.1. Follow these steps to remove the old ruby from the system, but be warned that it may not be as simple for you.
First thing was to remove the old ruby1.8. We had installed this from the Ubuntu package installer so removing it was as simple as running:
sudo apt-get uninstall ruby
or
sudo apt-get uninstall ruby1.8
-
Setting Up Ubuntu for Rails Development
These are a the procedures we use to setup a PC or VM for development of a ruby on rails application.
First things first, get your install software ready. These instructions are based on the Hardy Heron version of Ubuntu (8.04).
Install the base OS and then fire up the terminal so you can copy and paste the following commands.
So once you have the base installed, make sure your distribution is up to date:
sudo apt-get update
sudo apt-get dist-upgrade -
Rails and Microsoft Sql Server
So you want to connect your rails application to Microsoft SQL Server. The following instructions will take you through setting this up quite simply. This setup is on a a Ubuntu 8.04 server connecting to SQL Server 2000 (we will use the Northwind sample database). The first thing you need to do is install the following gems:
$ gem install dbi --version 0.4.0 $ gem install dbd-odbc --version 0.2.4 $ gem install rails-sqlserver-2000-2005-adapter -s https://gems.github.com
More info can be found on the sqlserver adapter gem development page. This is just the first step. Read the rest of this entry »
-
Mongrel Gem and Paperclip Plugin Problems
This problem occurred when setting up a site using mongrel along with the paperclip rails plugin. After about a week of normal operation we started having lots of problems with the automated image resizing required by the rails application.
It was running along and generating all the images just fine, then all of a sudden it stopped processing the ‘large’ images or made them blurry, and we started seeing the following in the application logs:
Paperclip::NotIdentifiedByImageMagickError: /folder/stream.####.# is not recognized by the 'indentify' command.
This is a very strange problem since the development environments work just fine and the developers were insistent that the server was the problem and not the code, as they usually do.
Read the rest of this entry »