无法在MediaTemple上安装Rails App?

时间:2009-08-30 06:17:22

标签: ruby-on-rails mediatemple

我在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'

1 个答案:

答案 0 :(得分:0)

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

** Starting Rails with development environment...

此外,如果您尝试运行RAILS_ENV=production script/server,应用程序是否在没有任何与gem相关的错误的情况下启动?这就是我要检查的内容。

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