1

Rails 新手...我正在使用 mac 并创建了一个新的 rails 项目,但服务器无法启动。这是我得到的错误。我在这台 Mac 上有另一个项目,使用该项目时可以启动服务器。有人有这方面的经验吗?谢谢!

/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.1.0/psych.bundle: warning: already initialized constant ANY
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.1.0/psych.bundle: warning: already initialized constant UTF8
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.1.0/psych.bundle: warning: already initialized constant UTF16LE
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.1.0/psych.bundle: warning: already initialized constant UTF16BE
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/stream.rb:12: warning: already initialized constant ANY
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/stream.rb:15: warning: already initialized constant UTF8
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/stream.rb:18: warning: already initialized constant UTF16LE
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/stream.rb:21: warning: already initialized constant UTF16BE
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/sequence.rb:42: warning: already initialized constant ANY
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/sequence.rb:45: warning: already initialized constant BLOCK
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/sequence.rb:48: warning: already initialized constant FLOW
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/scalar.rb:9: warning: already initialized constant ANY
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/scalar.rb:12: warning: already initialized constant PLAIN
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/scalar.rb:15: warning: already initialized constant SINGLE_QUOTED
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/scalar.rb:18: warning: already initialized constant DOUBLE_QUOTED
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/scalar.rb:21: warning: already initialized constant LITERAL
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/scalar.rb:24: warning: already initialized constant FOLDED
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/mapping.rb:16: warning: already initialized constant ANY
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/mapping.rb:19: warning: already initialized constant BLOCK
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/nodes/mapping.rb:22: warning: already initialized constant FLOW
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/visitors/visitor.rb:10: warning: already initialized constant DISPATCH
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/scalar_scanner.rb:8: warning: already initialized constant TIME
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/scalar_scanner.rb:11: warning: already initialized constant FLOAT
/Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/parser.rb:33:in `<class:Parser>': superclass mismatch for class Mark (TypeError)
from /Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/parser.rb:32:in `<module:Psych>'
from /Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych/parser.rb:1:in `<top (required)>'
from /Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:7:in `require'
from /Users/sisigu/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:7:in `<top (required)>'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/ordered_hash.rb:2:in `require'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/ordered_hash.rb:2:in `<top (required)>'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/ordered_options.rb:1:in `require'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/ordered_options.rb:1:in `<top (required)>'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/configuration.rb:2:in `require'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/configuration.rb:2:in `<top (required)>'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/railtie.rb:2:in `require'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/railtie.rb:2:in `<top (required)>'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/engine.rb:1:in `require'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/engine.rb:1:in `<top (required)>'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/plugin.rb:1:in `require'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/plugin.rb:1:in `<top (required)>'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application.rb:3:in `require'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application.rb:3:in `<top (required)>'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails.rb:10:in `require'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails.rb:10:in `<top (required)>'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/all.rb:1:in `require'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/all.rb:1:in `<top (required)>'
from /Users/sisigu/sisi_rails_projects/first_app/config/application.rb:3:in `require'
from /Users/sisigu/sisi_rails_projects/first_app/config/application.rb:3:in `<top (required)>'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:53:in `require'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:50:in `tap'
from /Users/sisigu/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
4

1 回答 1

0

创建后转到项目目录,然后使用命令安装包并使用bundle install命令启动 rails 服务器rails server

于 2013-04-07T04:58:11.163 回答