我正在使用Instant Rails,我是第一次引入脚手架。
所以一切看起来都很好,我做了我自己的RoR页面等,今天我进来今天当我去localhost:3000我收到以下错误信息:
糟糕! Google Chrome无法连接到localhost:3000
我将非常感谢您应该检查的任何建议。到目前为止,我知道要确认:
我有一个更新,Mongrel服务器没有正确启动我创建的新应用程序,而不是一个打开的窗口,它只是运行一个脚本并关闭窗口而不确认它已经启动。
提前致谢。
这是Mongrel错误的详细信息:
C:\ Users \ Will \ Desktop \ instantrails \ rails_apps \ talewiki> mongrel_rails start -p 30
00
**在0.0.0.0:3000开始监听Mongrel
**使用开发环境启动Rails ...
C:/Users/Will/Desktop/instantrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0。
2 / LIB / active_record / connection_adapters /抽象/ connection_specification.rb:217
:在establish_connection': development database is not configured (ActiveRecord
::AdapterNotSpecified)
from C:/Users/Will/Desktop/instantrails/ruby/lib/ruby/gems/1.8/gems/acti
verecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specifi
cation.rb:208:in
establish_connection'中
来自C:/Users/Will/Desktop/instantrails/ruby/lib/ruby/gems/1.8/gems/rail
s-2.0.2 / lib / initializer.rb:234:在initialize_database'
from C:/Users/Will/Desktop/instantrails/ruby/lib/ruby/gems/1.8/gems/rail
s-2.0.2/lib/initializer.rb:94:in
进程中
来自C:/Users/Will/Desktop/instantrails/ruby/lib/ruby/gems/1.8/gems/rail
s-2.0.2 / lib / initializer.rb:49:in send'
from C:/Users/Will/Desktop/instantrails/ruby/lib/ruby/gems/1.8/gems/rail
s-2.0.2/lib/initializer.rb:49:in
run'
来自C:/ Users / Will / Desktop / instantrails / rails_apps / talewiki / config / envir
onment.rb:13
来自C:/Users/Will/Desktop/instantrails/ruby/lib/ruby/site_ruby/1.8/ruby
gems / custom_require.rb:27:in gem_original_require'
from C:/Users/Will/Desktop/instantrails/ruby/lib/ruby/site_ruby/1.8/ruby
gems/custom_require.rb:27:in
require'
... 9级......
来自C:/Users/Will/Desktop/instantrails/ruby/lib/ruby/gems/1.8/gems/mong
rel-1.1.2-x86-mswin32 / bin /../ lib / mongrel / command.rb:212:in run'
from C:/Users/Will/Desktop/instantrails/ruby/lib/ruby/gems/1.8/gems/mong
rel-1.1.2-x86-mswin32/bin/mongrel_rails:281
from C:/Users/Will/Desktop/instantrails/ruby/bin/mongrel_rails:19:in
lo
广告'
来自C:/ Users / Will / Desktop / instantrails / ruby / bin / mongrel_rails:19
答案 0 :(得分:2)
看起来您的数据库尚未配置。查看APP_ROOT / config / database.yml文件,查找是否已创建与开发环境对应的数据库。设置数据库后,您的代码应运行正常。