rails3 app在Mac上第一次访问时停止工作

时间:2012-01-21 08:08:37

标签: ruby-on-rails macos ruby-on-rails-3

=> Booting WEBrick
=> Rails 3.1.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-01-21 12:47:45] INFO  WEBrick 1.3.1
[2012-01-21 12:47:45] INFO  ruby 1.9.3 (2011-10-30) [x86_64-darwin11.2.0]
[2012-01-21 12:47:45] INFO  WEBrick::HTTPServer#start: pid=1612 port=3000
[FATAL] failed to allocate memory

我将gem 'mysql2'添加到Gemfile并在mysql2中使用database.yml适配器。

该应用可以启动,但是当我访问http://localhost:3000时,我收到了此错误:

[FATAL] failed to allocate memory

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

我的解决方案是卸载mysql-connector-c,重新安装mysql。现在一切正常。