Tuesday, October 18, 2011

Get TextMate Features And Styles In Gedit With GMate

GMate is a collection of plugins, themes/styles and other improvements to get TextMate like features in Gedit.

To install GMate in Ubuntu, use the following commands:

sudo apt-add-repository ppa:ubuntu-on-rails/ppa
sudo apt-get update
sudo apt-get install gedit-gmate

This package will not replace Gedit! It will only add some themes and plugins you can enable/disable from the Gedit preferences.

For more info and other Linux distributions installation instructions, see https://github.com/gmate/gmate#readme


Tuesday, October 11, 2011

Uninitialized MySQL Constant Fix For Rails 3

If you’re doing local Rails development and are attempting to setup a database using MySQL (specifically, MySQL2) and you keep getting:

rake aborted!
uninitialized constant Mysql2

Here’s the fix to the problem:

From within the directory of your application, issue:

$ gem uninstall mysql2
$ gem install mysql2 

This will make sure that you’re running the most recent version of the gem.

Next, update your Gemfile. Comment out the default SQLite reference and add a line for MySQL:

#gem 'sqlite3'
#gem 'mysql2'

Save the file and finally, rake your database:

$ rake db:create

And that should take care of it.