在 MediaTemple 上安装 Rails 应用程序时遇到问题?

发布于 2024-08-03 04:02:47 字数 4017 浏览 8 评论 0原文

我在 MediaTemple 的网格服务器上安装应用程序时遇到一些问题...我正在使用 cap 和 github 进行部署...一切似乎都正常,但应用程序无法启动。我的database.yml 文件似乎有问题?我检查了空间错误,这些看起来都不错。

当我尝试从那里开始时,这是控制台的副本:

XXXXXXXXX.com@n11:/home/65633/containers/rails/GDB/current$ script/server RAILS_ENV="production" --trace
** Ruby version is not up-to-date; loading cgi_multipart_eof_fix
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
server: invalid option: --trace
=> Rails 2.2.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
config.gem: Unpacked gem geokit-1.4.1 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
Exiting
/home/65633/data/rubygems/gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:60:in `establish_connection': development database is not configured (ActiveRecord::AdapterNotSpecified)
    from /home/65633/data/rubygems/gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:53:in `establish_connection'
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/initializer.rb:392:in `initialize_database'
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/initializer.rb:139:in `process'
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/initializer.rb:112:in `send'
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/initializer.rb:112:in `run'
    from /nfs/c04/h03/mnt/65633/containers/rails/GDB/releases/20090830045026/config/environment.rb:15
    from /home/65633/data/rubygems/lib/rubygems/custom_require.rb:31:in `gem_original_require'
    from /home/65633/data/rubygems/lib/rubygems/custom_require.rb:31:in `require'
     ... 24 levels...
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/commands/server.rb:49
    from /home/65633/data/rubygems/lib/rubygems/custom_require.rb:31:in `gem_original_require'
    from /home/65633/data/rubygems/lib/rubygems/custom_require.rb:31:in `require'
    from script/server:3

这是杂种日志:

** Daemonized, any open files are closed.  Look at log/mongrel.pid and log/mongrel.log for info.
** Starting Mongrel listening at 0.0.0.0:2017
** Starting Rails with production environment...
/home/65633/data/rubygems/lib/rubygems/custom_require.rb:31:in `gem_original_require': /home/65633/containers/rails/GDB/releases/20090830060044/app/controllers/administration_controller.rb:159: syntax error, unexpected kEND, expecting $end (SyntaxError)
    from /home/65633/data/rubygems/lib/rubygems/custom_require.rb:31:in `require'
    from /home/65633/data/rubygems/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:155:in `require'
    from /home/65633/data/rubygems/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:262:in `require_or_load'
    from /home/65633/data/rubygems/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:221:in `depend_on'
    from /home/65633/data/rubygems/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:133:in `require_dependency'
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/initializer.rb:368:in `load_application_classes'
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/initializer.rb:367:in `each'
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/initializer.rb:367:in `load_application_classes'
     ... 17 levels...
    from /home/65633/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/bin/../lib/mongrel/command.rb:212:in `run'
    from /home/65633/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/bin/mongrel_rails:281
    from /home/65633/data/rubygems/gems/bin/mongrel_rails:19:in `load'
    from /home/65633/data/rubygems/gems/bin/mongrel_rails:19

mtr start error

application started, but pid file was not found, check 'mtr status'

I am having some trouble installing an app on MediaTemple's Grid Servers... I'm deploying with cap and github... everything seems to go ok with those, but the app won't start up. There seems to be a problem with my database.yml file? I've checked for space errors and those all look good.

Here is a copy of the console when I try and start from there:

XXXXXXXXX.com@n11:/home/65633/containers/rails/GDB/current$ script/server RAILS_ENV="production" --trace
** Ruby version is not up-to-date; loading cgi_multipart_eof_fix
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
server: invalid option: --trace
=> Rails 2.2.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
config.gem: Unpacked gem geokit-1.4.1 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
Exiting
/home/65633/data/rubygems/gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:60:in `establish_connection': development database is not configured (ActiveRecord::AdapterNotSpecified)
    from /home/65633/data/rubygems/gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:53:in `establish_connection'
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/initializer.rb:392:in `initialize_database'
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/initializer.rb:139:in `process'
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/initializer.rb:112:in `send'
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/initializer.rb:112:in `run'
    from /nfs/c04/h03/mnt/65633/containers/rails/GDB/releases/20090830045026/config/environment.rb:15
    from /home/65633/data/rubygems/lib/rubygems/custom_require.rb:31:in `gem_original_require'
    from /home/65633/data/rubygems/lib/rubygems/custom_require.rb:31:in `require'
     ... 24 levels...
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/commands/server.rb:49
    from /home/65633/data/rubygems/lib/rubygems/custom_require.rb:31:in `gem_original_require'
    from /home/65633/data/rubygems/lib/rubygems/custom_require.rb:31:in `require'
    from script/server:3

Here is the mongrel log:

** Daemonized, any open files are closed.  Look at log/mongrel.pid and log/mongrel.log for info.
** Starting Mongrel listening at 0.0.0.0:2017
** Starting Rails with production environment...
/home/65633/data/rubygems/lib/rubygems/custom_require.rb:31:in `gem_original_require': /home/65633/containers/rails/GDB/releases/20090830060044/app/controllers/administration_controller.rb:159: syntax error, unexpected kEND, expecting $end (SyntaxError)
    from /home/65633/data/rubygems/lib/rubygems/custom_require.rb:31:in `require'
    from /home/65633/data/rubygems/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:155:in `require'
    from /home/65633/data/rubygems/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:262:in `require_or_load'
    from /home/65633/data/rubygems/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:221:in `depend_on'
    from /home/65633/data/rubygems/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:133:in `require_dependency'
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/initializer.rb:368:in `load_application_classes'
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/initializer.rb:367:in `each'
    from /home/65633/data/rubygems/gems/gems/rails-2.2.2/lib/initializer.rb:367:in `load_application_classes'
     ... 17 levels...
    from /home/65633/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/bin/../lib/mongrel/command.rb:212:in `run'
    from /home/65633/data/rubygems/gems/gems/mongrel-1.1.5-x86-linux/bin/mongrel_rails:281
    from /home/65633/data/rubygems/gems/bin/mongrel_rails:19:in `load'
    from /home/65633/data/rubygems/gems/bin/mongrel_rails:19

mtr start error

application started, but pid file was not found, check 'mtr status'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

七禾 2024-08-10 04:02:47

命令 script/server RAILS_ENV="product" 显然不会在开发环境中启动 Mongrel,正如您从第一个摘录中的日志行中看到的那样:

** Starting Rails with development environment...

此外,如果您尝试运行 RAILS_ENV=生产脚本/服务器,应用程序启动时是否没有任何与 gem 相关的错误?这就是我要检查的。

至于第二个日志文件中的错误,我不太确定。 Administration_controller.rb 的第 159 行是什么?

The command script/server RAILS_ENV="production" clearly doesn't start Mongrel with the development environment, as you can see from this log line from your first excerpt:

** Starting Rails with development environment...

Furthermore, if you try to run RAILS_ENV=production script/server, does the application start without any gem related errors? That's what I would check.

As for the error in the second logfile, I'm not really sure. What is in line 159 of your administration_controller.rb?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文