0

好的,这是我第一次启动 Rails 生产服务器。

当我尝试在浏览器中查看网络应用程序时,我得到:

No such file to load -- /home/dan/RubymineProjects/RubyMineTest/config/environment (LoadError)
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/var/www/eReferral/eReferral/app/helpers/cpsa_util.rb:1:in `<top (required)>'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:330:in `require_or_load'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:289:in `depend_on'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:207:in `require_dependency'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:465:in `block (2 levels) in eager_load!'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:464:in `each'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:464:in `block in eager_load!'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:462:in `each'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:462:in `eager_load!'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:347:in `eager_load!'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application/finisher.rb:56:in `each'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/administrator/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
/home/administrator/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
/home/administrator/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
/home/administrator/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
/home/administrator/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:180:in `each'
/home/administrator/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
/home/administrator/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/var/www/eReferral/eReferral/config/environment.rb:9:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
/var/www/eReferral/eReferral/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/home/administrator/.rvm/gems/ruby-2.0.0-p451/gems/passenger-4.0.38/helper-scripts/rack-preloader.rb:112:in `eval'
/home/administrator/.rvm/gems/ruby-2.0.0-p451/gems/passenger-4.0.38/helper-scripts/rack-preloader.rb:112:in `preload_app'
/home/administrator/.rvm/gems/ruby-2.0.0-p451/gems/passenger-4.0.38/helper-scripts/rack-preloader.rb:158:in `<module:App>'
/home/administrator/.rvm/gems/ruby-2.0.0-p451/gems/passenger-4.0.38/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/home/administrator/.rvm/gems/ruby-2.0.0-p451/gems/passenger-4.0.38/helper-scripts/rack-preloader.rb:28:in `<main>'

配置.ru:

# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment',  __FILE__)
run Rails.application

配置/环境.rb:

# Load the Rails application.
require File.expand_path('../application', __FILE__)

# Load the app's custom environment variables here, so that they are loaded before environments/*.rb
app_env_variables = File.join(Rails.root, 'config', 'app_env_variables.rb')
load(app_env_variables) if File.exists?(app_env_variables)

# Initialize the Rails application.
RubyMineTest::Application.initialize!

另外,我的 tmp 目录:

/tmp$ ls -LR

.:
cache  restart.txt

./cache:
assets

./cache/assets:
production

./cache/assets/production:
sass  sprockets

./cache/assets/production/sass:
4606f7a84f34e733d7175a61bab50f50e68daef5  96bb3524e75351d4a8c432c054b44f6fda057bac
736a3da50d4a76217e907f6d6eae90a427daa19b  9f36c8b8e68eb6dd6fd6b5fdb56562aeb25220a8

./cache/assets/production/sass/4606f7a84f34e733d7175a61bab50f50e68daef5:
_functions.scssc

./cache/assets/production/sass/736a3da50d4a76217e907f6d6eae90a427daa19b:
application.css.scssc  favourites.css.scssc  feedbacks.css.scssc    foundation_and_overrides.css.scssc  ref_docs.css.scssc

./cache/assets/production/sass/96bb3524e75351d4a8c432c054b44f6fda057bac:
foundation.scssc

./cache/assets/production/sass/9f36c8b8e68eb6dd6fd6b5fdb56562aeb25220a8:
_accordion.scssc      _clearing.scssc          _grid.scssc          _offcanvas.scssc       _reveal.scssc         _tabs.scssc
_alert-boxes.scssc    _dropdown-buttons.scssc  _inline-lists.scssc  _orbit.scssc           _side-nav.scssc       _thumbs.scssc
_block-grid.scssc     _dropdown.scssc          _joyride.scssc       _pagination.scssc      _split-buttons.scssc  _tooltips.scssc
_breadcrumbs.scssc    _flex-video.scssc        _keystrokes.scssc    _panels.scssc          _sub-nav.scssc        _top-bar.scssc
_button-groups.scssc  _forms.scssc             _labels.scssc        _pricing-tables.scssc  _switch.scssc         _type.scssc
_buttons.scssc        _global.scssc            _magellan.scssc      _progress-bars.scssc   _tables.scssc         _visibility.scssc

./cache/assets/production/sprockets:
059a75b3b827305fe269ef43b55f6c05  326c0fc33e26e4bdb6564b6e385e997b  80c0e44e1fcfb165924912e60049f1b8  c33305051314b3801e3ccd5604cfb201
066c7d624dbbf0ed9678d445626d67d9  34d4f1090a4964580f18bc41c4ec1823  81b353364eb95b005071988183e8d310  c8a0f1c9849286ba498dee6dbae54dca
067302be7fc4e929ed234394d639bf22  3914fbe7e0e79b3e5331a22fab31d97d  820bf24b1f63a672b27b677be3852f28  c8f2fb610bed5ffc78fca3ebeb34b976
090cecc1cbfcce778a17479ac1a949ec  392c860b952b8e0f8b8a683031312ca1  8341472a2bf229d9267e536f14216aef  c99dbb16bdcb5995ee38001b377c504b
0937ee1bc51ee7ba190bf490d90ea272  393782a587ae4837b8944b742bdcad1a  83ec58aac2e6effa0403d2279f845a5d  cdb00a3556bce86b1c04fbc8abaedfde

这是我不明白的。它列出的路径/home/dan/RubymineProjects/RubyMineTest来自我的开发服务器。我搜索了任何硬编码的东西,但我找不到任何东西。我不知道它是从哪里得到的……有什么想法吗?

4

1 回答 1

1

我再次搜索......这次我发现一个文件确实有几个硬编码的依赖项。

掌心

谢谢您的帮助

于 2014-03-12T18:38:00.643 回答