gpt4 book ai didi

mysql - 初学者 Ruby/MSQL 错误

转载 作者:行者123 更新时间:2023-11-29 09:19:04 24 4
gpt4 key购买 nike

http://localhost:3000/genre

我正在使用 Instant Rails,这是我第一次引入脚手架。

所以一切看起来都工作正常,我做了我自己的 RoR 页面等,今天我进来,当我转到 localhost:3000 时,我收到以下错误消息:

哎呀! Google Chrome 无法连接到 localhost:3000

任何有关我应该检查的内容的建议将不胜感激。到目前为止我知道确认:

  1. Windows 主机文件将 127.0.0.1 连接到 localhost

我对此进行了更新,Mongrel 服务器无法使用我创建的新应用程序正常启动,而不是打开一个窗口,它只是运行一个脚本并关闭窗口,而无需确认它已启动。

提前致谢。

这是 Mongrel 错误的详细信息:

C:\Users\Will\Desktop\instantrails\rails_apps\talewiki>mongrel_rails start -p 3000** 从 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/abstract/connection_specation.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
建立连接' 来自 C:/Users/Will/Desktop/instantrails/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:234:in 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/rails-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
运行' 来自 C:/Users/Will/Desktop/instantrails/rails_apps/talewiki/config/environment.rb:13 来自 C:/Users/Will/Desktop/instantrails/ruby/lib/ruby/site_ruby/1.8/rubygems/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
要求' ... 9 级... 来自 C:/Users/Will/Desktop/instantrails/ruby/lib/ruby/gems/1.8/gems/mongrel-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
罗广告' 来自 C:/Users/Will/Desktop/instantrails/ruby/bin/mongrel_rails:19

最佳答案

看来您的数据库尚未配置。查看APP_ROOT/config/database.yml文件,查看是否创建了与开发环境对应的数据库。设置数据库后,您的代码应该可以正常运行。

关于mysql - 初学者 Ruby/MSQL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2911842/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com