I am new to rails and when I am follow one the rails guide to create a
simple application. I got this error.
E:\RoRLab\toolset>rake db:migrate --trace
(in /cygdrive/e/RoRLab/toolset)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
development database is not configured
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.r
b:217:in establish_connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.r b:208:in
establish_connection’
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:234:in
initialize_database' /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:94:in
process’
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in send' /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in
run’
/cygdrive/e/RoRLab/toolset/config/environment.rb:13
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require’
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/misc.rake:3
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in
execute’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in
execute’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
synchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in
invoke_prerequisites’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in
send’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in
invoke_prerequisites’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
synchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in
invoke’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
top_level’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
top_level’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in
top_level’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
standard_exception_handling’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31 C:/cygwin/bin/rake:19:in
load’
C:/cygwin/bin/rake:19
I am using mysql as DB ,and I have only one migration file, as blow:
class CreateResources < ActiveRecord::Migration
def self.up
create_table :resources do |t|
t.string :link
t.string :name
t.text :comment
t.timestamps
end
end
def self.down
drop_table :resources
end
end