我正在尝试在rails中迁移我的数据库但没有找到表。仅使用开发环境和我正在采取的步骤是通过Lynda rails 2010教程。任何帮助将非常感激。信息如下
NOC-4:app noc$ rake db:migrate
(in /Users/noc/rails_projects/app)
== CreateUsers: migrating ====================================================
-- create_table(:users)
-> 0.0566s
== CreateUsers: migrated (0.0567s) ===========================================
NOC-4:app noc$ mysql -u simple_cms -p simple_cms_development
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.5.20 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SHOW TABLES
->
以下是我的database.yml
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: mysql
database: simple_cms_development
username: simple_cms
password: secretpassword
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be eased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql
database: simple_cms_test
username: simple_cms
password:
pool: 5
timeout: 5000
production:
adapter: mysql
database: simple_cms_development
username: simple_cms
password:
pool: 5
timeout: 5000
也是我在Gemfile中需要的信息
source 'http://rubygems.org'
gem 'rails', '3.1.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'ruby-mysql'
gem 'activerecord'
gem 'mysql'
gem 'rake', '~> 0.8.7'
gem 'therubyracer', :require => 'v8'
答案 0 :(得分:1)
你的分号在哪里,伙计?
mysql> show tables;