I've encountered a problem. I recently cloned an application on github and tried to launch it using the Rails Console. When I typed in the name of one of the tables, I received this message.
Project
=> Project(Table doesn't exist)
Here is the Schema.rb file
ActiveRecord::Schema.define(version: 20120504152649) do
create_table "projects", force: true do |t|
t.string "name"
t.string "point_scale", default: "fibonacci"
t.date "start_date"
t.integer "iteration_start_day", default: 1
t.integer "iteration_length", default: 1
t.datetime "created_at"
t.datetime "updated_at"
t.integer "default_velocity", default: 10
end
create_table "projects_users", id: false, force: true do |t|
t.integer "project_id"
t.integer "user_id"
end
end
Here is the Projects Migration
class CreateProjects < ActiveRecord::Migration
def self.up
create_table :projects do |t|
t.string :name
t.string :point_scale, :default => 'fibonacci'
t.date :start_date
t.integer :iteration_start_day, :default => 1
t.integer :iteration_length, :default => 1
t.timestamps
end
end
def self.down
drop_table :projects
end
end
The Gemfile
source 'http://rubygems.org'
ruby '2.1.0'
gem 'rails', '4.0.2'
gem 'sass-rails', '~> 4.0.1'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.1'
gem 'jquery-rails'
gem 'jbuilder', '~> 1.2'
gem 'ejs'
gem "compass-rails", "~> 1.1.2"
gem "devise", "~> 3.2.0"
gem 'transitions', '0.1.9', :require => ["transitions", "active_record/transitions"]
gem 'rails-i18n'
gem 'configuration'
gem 'rails-observers', '~> 0.1.2'
# gem 'protected_attributes'
gem 'jquery-ui-rails'
group :production do
gem 'pg'
# This helps with serving assets and log files on the heroku platform.
# See https://github.com/heroku/rails_12factor
# https://devcenter.heroku.com/articles/rails4#logging-and-assets
gem 'rails_12factor'
end
group :development, :test do
gem 'sqlite3'
gem 'rspec-rails'
gem 'factory_girl_rails'
gem 'jasmine', '~> 1.3.2'
gem 'capybara'
gem 'database_cleaner'
end
Here is my database.yml file
# SQLite
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
I've tried migrating the database
rake db:migrate
=>undefined method `database_authenticatable' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x007fd7832ed418>/Users/richardhamilton/MyProjects/fulcrum/db/migrate/20110210082458_devise_create_users.rb:4:in `block in up'
I've tried creating the database
rake db:create
db/development.sqlite3 already exists
I've tried loading the schema
rake db:schema::load
rake aborted!
Don't know how to build task 'db:schema::load'
I don't know why it couldn't find a table.