scaffold doesnt work...

M

Manish Kutaula

i issue the following command at terminal...


neo:~/Desktop/rails/modeler # ruby script/generate scaffold Item Manage
exists app/controllers/
exists app/helpers/
create app/views/manage
exists app/views/layouts/
exists test/functional/
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/item.rb
create test/unit/item_test.rb
create test/fixtures/items.yml
Couldn't find 'item' generator


what could be the problem....
 
M

Manish Kutaula

guess what i updated rails version to 1.2.6 and aprevious problem get
solved but new problem arises....

ruby script/generate scaffold Item Manage

/usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 18, col 2:
` socket: /var/lib/mysql/mysql.sock' (ArgumentError)
from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/initializer.rb:551:in
`database_configuration'
from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/initializer.rb:234:in
`initialize_database'
from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/initializer.rb:92:in
`process'
from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/initializer.rb:47:in `send'
from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/initializer.rb:47:in `run'
from ./script/../config/../config/environment.rb:13
from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/commands/generate.rb:1
from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from script/generate:3



and even the server is not starting now....



neo:~/Desktop/rails/store # ruby script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
Exiting
/usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 18, col 2:
` socket: /var/lib/mysql/mysql.sock' (ArgumentError)
from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/initializer.rb:551:in
`database_configuration'
from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/initializer.rb:234:in
`initialize_database'
from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/initializer.rb:92:in
`process'
from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/initializer.rb:47:in `send'
from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/initializer.rb:47:in `run'
from /root/Desktop/rails/store/config/environment.rb:13
from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
... 25 levels...
from
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/commands/server.rb:39
from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from script/server:3


i m goind mad please help
...
 
M

Manish Kutaula

hey got solution to my problem ....

The IRC guys rocks man..

i updated my rails version then after there was a lttle error in my
databse.yaml file. a silly mistake i have not a space after the
password:

no error now..

again thanks to those irc folks specially diryhand.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top