Ruby Quicktips Logo

Ruby Quicktips

Random Ruby and Rails tips.
This blog is dedicated to deliver short, interesting and practical tidbits of the Ruby language and Ruby on Rails framework. Read more...

Your submissions are more than welcome!
Jan 31 ’12

Log in to your database console using Rails

Instead of using the database-specific command to start your project’s database console, Rails provides one consistent interface for the most popular databases (MySQL, PostgreSQL and SQLite):

script/dbconsole [RAILS_ENV] # Rails 2
rails dbconsole [RAILS_ENV] # Rails 3
rails db [RAILS_ENV] # Rails 3 alias

3 notes 0 comments

  1. shabdar reblogged this from rubyquicktips
  2. errm reblogged this from rubyquicktips
  3. loganathan submitted this to rubyquicktips

Comments

You can use HTML tags for formatting. Wrap code in <code> tags and multiple lines of code in <pre><code> tags.

blog comments powered by Disqus