2011-01-11 52 views
0

当我尝试启动瘦身并点击URL时,出现以下错误。任何关于如何解决这个问题的指针?Rails 3,Thin和Nginx

/usr/lib/ruby/gems/1.8/gems/rspec-core-2.3.1/lib/rspec/core/configuration_options.rb:9:in `expand_path': couldn't find HOME environment -- expanding `~' (ArgumentError) 
    from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.3.1/lib/rspec/core/configuration_options.rb:9 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require' 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require' 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency' 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in `new_constants_in' 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency' 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.3.1/lib/rspec/core.rb:17 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require' 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require' 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency' 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in `new_constants_in' 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency' 
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-2.3.0/lib/rspec.rb:1 
    from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require' 
    from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require' 
    from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each' 
    from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `require' 
    from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `each' 
    from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `require' 
    from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:112:in `require' 
    from /root/company/project/config/application.rb:8 
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
    from /root/company/project/config/environment.rb:2 
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
    from /root/company/project/config.ru:3 
    from /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval' 
    from /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize' 
    from /root/company/project/config.ru:1:in `new' 
    from /root/company/project/config.ru:1 

回答

3

查看您的配置文件中是否包含~的文件路径。可能你的Gemfile中有一个~,它与rspec有某种关系。跟踪似乎表明Bundler无法初始化rspec,因为有一个带有波形字符的路径,无法扩展,因为应用程序通过精简启动时没有HOME环境变量。找到它时,请用完全合格的路径替换路径。

+0

我通过使宝石文件组的测试分别相关宝石固定它。我想现在可能会在启动服务器时包含它。 – 2011-01-12 09:00:03