Viewing Posts from February, 2008

Mysql Console Rake Task

    

    I just wanted to share a handy rake task that I found. It allows you to connect directly to a mysql console in a linux shell(granted the 'mysql' command is present). It reads in the mysql connection settings stored in config/database.yml so there's no need to enter in a user/database name or password. Here's the code you can add to lib/tasks/mysql.rake (or whatever) or Rakefile

def mysql_console(config)
  returning '' do |mysql|
    mysql << mysql_command << ' '
    mysql << "-u#{config['username']} " if config['username']
    mysql << "-p#{config['password']} " if config['password']
    mysql << "-h#{config['host']} "     if config['host']
    mysql << "-P#{config['port']} "     if config['port']
    mysql << config['database']         if config['database']
  end
end

def mysql_command
  'mysql'
end

desc "Launch mysql shell.  Use with an environment task (e.g. rake production mysql)"
task :mysql do
  system sh_mysql(YAML.load(open(File.join('config', 'database.yml')))[RAILS_ENV])
end

 Then you would run the task by typing:

 $ rake mysql

 Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 109184 to server version: 5.0.45-community-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

That's it!


Comment_add  (0) Comments




Onyx Released

    
Onyx

Well, we finally released the first version of Onyx today, our Ruby on Rails gallery application. It's the very first version, and we've tested it quite a bit, and it seems to be very promising. Since it is brand new, it is still in beta. It has a couple of really cool features, url image grabbing and tag galleries, etc. Take a look, here's the link to the project page:

 http://www.hulihanapplications.com/projects_onyx.php

Download it or try the demo, and let us know what you think! 


Comment_add  (1) Comments




Amethyst released

    

 

Amethyst
 

    It's that time again. We released another application this month! Today we released Amethyst to the public. It's a blogging application written in ruby on rails. It's very simple, clean, and straightforward. Keep in mind that it's our first release, so it's in beta(though we've tested it quite a bit, just like anything else we release). Our blog runs on amethyst, so check it out and see what you think. If you have any suggestions, let us know!

    If you're interested in the Amethyst blog software, you can try out a demo or download it at the project page here:

 http://www.hulihanapplications.com/projects_amethyst.php

Enjoy! 


Comment_add  (0) Comments




Powered_by_amethyst
Archive
Search
Tags
          Databases (1)
          General (2)
          Hosting (1)
          Hulihan Applications (3)
          Programming (1)
          Ruby (2)
          Ruby on Rails (6)
          Servers (1)
          Software (2)
view rss feed
This site is best displayed in FireFox 1.5+, IE 7+, and Opera 9+