Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
trouble with rails :./script/new_controller error
bin liu
11/12/2004 3:41:00 AM
Hi all :
I installed rails success ,and have seen the "Congratulations, you're on Rails!" page . but when i execute new_controller followed "
http://www.rubyonrails.org/show/TutorialStepT...
,some error occurs,it seems that somthing wrong with "YAML::load(File.open(File.dirname(__FILE__) + "/../../config/database.yml")) " .bellow is debug message:
thanks ,all.
[root@router script]# ruby -d ./new_controller Friends list display new edit
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/support/clean_logger.rb:7: warning: method redefined; discarding old format_message
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:145: warning: method redefined; discarding old default
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5 - No such file to load -- postgres
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5 - No such file to load -- sqlite
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/clean_logger.rb:7: warning: method redefined; discarding old format_message
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/class_attribute_accessors.rb:4: warning: method redefined; discarding old cattr_reader
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/class_attribute_accessors.rb:31: warning: method redefined; discarding old cattr_writer
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/class_attribute_accessors.rb:53: warning: method redefined; discarding old cattr_accessor
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/class_inheritable_attributes.rb:6: warning: redefine append_features
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/class_inheritable_attributes.rb:14: warning: method redefined; discarding old inheritable_attributes
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/class_inheritable_attributes.rb:18: warning: method redefined; discarding old write_inheritable_attribute
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/class_inheritable_attributes.rb:22: warning: method redefined; discarding old write_inheritable_array
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/class_inheritable_attributes.rb:27: warning: method redefined; discarding old read_inheritable_attribute
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/class_inheritable_attributes.rb:32: warning: method redefined; discarding old inherited
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/inflector.rb:6: warning: method redefined; discarding old pluralize
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/inflector.rb:14: warning: method redefined; discarding old singularize
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/inflector.rb:22: warning: method redefined; discarding old camelize
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/inflector.rb:26: warning: method redefined; discarding old underscore
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/inflector.rb:30: warning: method redefined; discarding old demodulize
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/inflector.rb:34: warning: method redefined; discarding old foreign_key
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/inflector.rb:40: warning: method redefined; discarding old plural_rules
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.0/lib/action_controller/support/inflector.rb:55: warning: method redefined; discarding old singular_rules
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5 - No such file to load -- Win32API
/usr/local/lib/ruby/1.8/cgi/session/pstore.rb:17: warning: method redefined; discarding old []=
Exception `DRb::DRbServerNotFound' at /usr/local/lib/ruby/1.8/drb/drb.rb:1528 - DRb::DRbServerNotFound
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5 - No such file to load -- builder
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5 - No such file to load -- redcloth
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5 - No such file to load -- tmail/base64.so
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5 - No such file to load -- tmail/scanner_c.so
/usr/local/lib/ruby/gems/1.8/gems/actionmailer-0.3.0/lib/action_mailer/vendor/tmail/obsolete.rb:62: warning: discarding old each_dest
Exception `ArgumentError' at /usr/local/lib/ruby/1.8/yaml.rb:119 - parse error on line 14, col -1: `'
/usr/local/lib/ruby/1.8/yaml.rb:119:in `load': parse error on line 14, col -1: `' (ArgumentError)
from /usr/local/lib/ruby/1.8/yaml.rb:119:in `load'
from ./../config/environments/shared.rb:16:in `database_configurations'
from ./../config/environments/production.rb:6
from ./new_controller:3:in `require'
from ./new_controller:3
1 Answer
Dmitry V. Sabanin
11/12/2004 4:38:00 AM
0
On Friday 12 November 2004 10:40, bin liu wrote:
> Hi all :
>
> I installed rails success ,and have seen the "Congratulations, you're on
> Rails!" page . but when i execute new_controller followed
> "
http://www.rubyonrails.org/show/TutorialStepT...
,some error occurs,it
> seems that somthing wrong with
> "YAML::load(File.open(File.dirname(__FILE__) +
> "/../../config/database.yml")) " .bellow is debug message:
....
> Exception ArgumentError' at /usr/local/lib/ruby/1.8/yaml.rb:119 - parse
error on
> line 14, col -1: `' /usr/local/lib/ruby/1.8/yaml.rb:119:in `load': parse
> error on line 14, col -1: `' (ArgumentError) from
I saw that error just before yesterday. For me problem was in database.yml
file, there were bad chars inside it, I couldn't find what exactly though. My
problem appeared when I moved my Rails app developed on windows to a Linux
server. After rewriting the hole database.yml from scratch on nix everything
worked. Try that.
P.S. Btw, that wasn't LF/CRLF issue, afaik, because dos2unix(which I tried
first) didn't fix it
--
sdmitry -=- Dmitry V. Sabanin
MuraveyLabs.
Spam Here -> postmaster@sco.com
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
trouble with rails :./script/new_controller error
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password