Dear Ruby Coder:
I was trying to create a Schema with this command:
( I am using WINDOWS for my gem 0.9.0 and rails 1.2.1. MySQL5 is already
ON and I already installed RAKE )
~*~*~*~*~*~*~**~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~**~*~*~*~*~*~*~*~*~*~
C:\ruby\project\ruby script/generate model Author
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/author.rb
create test/unit/author_test.rb
create test/fixtures/authors.yml
create db/migrate
create db/migrate/001_create_authors.rb
C:\ruby\project\_
~*~*~*~*~*~*~**~*~*~*~*~*~*~*~*~*~~*~*~*~*~*~*~**~*~*~*~*~*~*~*~*~*~
Then I made editing in 001_create_authors.rb like this
~*~*~*~*~*~*~**~*~*~*~*~*~*~*~*~*~~*~*~*~*~*~*~**~*~*~*~*~*~*~*~*~*~
class CreateAuthors < ActiveRecord::Migration
def self.up
create_table :authors do |t|
t.column :first_name, :string
t.column :last_name, :string
end
end
def self.down
drop_table :authors
end
end
~*~*~*~*~*~*~**~*~*~*~*~*~*~*~*~*~~*~*~*~*~*~*~**~*~*~*~*~*~*~*~*~*~
After That I made command like this :
~*~*~*~*~*~*~**~*~*~*~*~*~*~*~*~*~~*~*~*~*~*~*~**~*~*~*~*~*~*~*~*~*~
C:\ruby\project\rake db:migrate
(in C:/ruby/project)
rake aborted!
#42000Unknown database ''project_development''
(See full trace by running task with --trace)
C:\ruby\project>_
~*~*~*~*~*~*~**~*~*~*~*~*~*~*~*~*~~*~*~*~*~*~*~**~*~*~*~*~*~*~*~*~*~
Please tell me what was happened? and how I can handle this error. I
need your kind respond soon. Thank you for helping before.
Respectfully,
Malioboro
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
> Please tell me what was happened? and how I can handle this error. I > need your kind respond soon. Thank you for helping before. > > Respectfully, > > MalioboroAssuming your rails app is named "project", by default rails will look for a database called project_development in which to do development work. If you have no created this database, you need to do so because you can perform any migrations. -Drew -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Drew Olson wrote:>> Please tell me what was happened? and how I can handle this error. I >> need your kind respond soon. Thank you for helping before. >> >> Respectfully, >> >> Malioboro > > Assuming your rails app is named "project", by default rails will look > for a database called project_development in which to do development > work. If you have no created this database, you need to do so because > you can perform any migrations. > > -DrewI need to stop drinking Red Bull at work. You need to create this database *before* you can perform any migrations. -Drew -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
So, I have to create database in mySQL Server using project_development. I hope my statement is not false. Thank you so much, I am sorry because I am new in Ruby on Rails. I need your support and advice. Thank you. Malioboro -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Visit Indonesia 2008 wrote:> So, I have to create database in mySQL Server using project_development. > I hope my statement is not false. > > Thank you so much, I am sorry because I am new in Ruby on Rails. I need > your support and advice. Thank you. > > MalioboroYes you will need to create database "project_development". In your case you will need to check whether database is present or not. Go to MySQL command line client and type "show databses;". -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---