Hello,
I am using Komodo Edit 5.0 for ROR. I have made the database by using
the macros in it. But when I make model using sacffold, I get error. The
details are given below:
C:/Ruby/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 22, col 2:
password:’ (ArgumentError)
from C:/Ruby/lib/ruby/1.8/yaml.rb:133:in load' from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:819:in
database_configuration’
from
C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:391:in
initialize_database' from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:139:in
process’
from
C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in
send' from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in
run’
from E:/ror/MovieApp/config/environment.rb:13
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require’
from
C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/generate.rb:1
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require’
from script/generate:3
My database.yml is given below
MySQL. Versions 4.1 and 5.0 are recommended.
Install the MySQL driver:
gem install mysql
On Mac OS X:
sudo gem install mysql – --with-mysql-dir=/usr/local/mysql
On Mac OS X Leopard:
sudo env ARCHFLAGS=“-arch i386” gem install mysql –
–with-mysql-config=/usr/local/mysql/bin/mysql_config
This sets the ARCHFLAGS environment variable to your native
architecture
On Windows:
gem install mysql
Choose the win32 build.
Install MySQL and put its /bin directory on your path.
And be sure to use new-style password hashing:
http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql
encoding: utf8
database: MovieApp_development
pool: 5
username:root
password:
host: localhost
Warning: The database defined as “test” will be erased 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
encoding: utf8
database: MovieApp_test
pool: 5
username: root
password:
host: localhost
production:
adapter: mysql
encoding: utf8
database: MovieApp_production
pool: 5
username: root
password:
host: localhost
Please help me in tis regard.