2

尝试按照https://github.com/documentcloud/documentcloud/blob/master/INSTALL上的说明安装 documentcloud 。Nginx 启动正常,但出现错误:

no such file to load -- bundler/setup (LoadError)
  /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
  /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
  /root/.gems/gems/passenger-4.0.4/lib/phusion_passenger/loader_shared_helpers.rb:212:in `run_load_path_setup_code'
  /root/.gems/gems/passenger-4.0.4/helper-scripts/rack-preloader.rb:73:in `preload_app'
  /root/.gems/gems/passenger-4.0.4/helper-scripts/rack-preloader.rb:127

不知道除了我的配置之外还包括什么:

--开始配置--

user www-data www-data;
worker_processes 4;

error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;

events {
  worker_connections 1024;
}

http {
  passenger_root /root/.gems/gems/passenger-4.0.4;
  passenger_ruby /usr/bin/ruby1.8;
  passenger_default_user www-data;
  passenger_pool_idle_time 0;
  passenger_max_pool_size 4;

  include       mime.types;
  default_type  application/octet-stream;
  access_log    /var/log/nginx/access.log;

  sendfile              on;
  tcp_nopush            on;
  keepalive_timeout     2;
  client_max_body_size  200M;

  ssl_ciphers         ALL:!aNULL:!ADH:!eNULL:!MEDIUM:!LOW:!EXP:!kEDH:RC4+RSA:+HIGH;
  ssl_session_cache   shared:SSL:10m;
  ssl_session_timeout 10m;

  gzip            on;
  gzip_static     on;
  gzip_comp_level 2;
  gzip_proxied    any;
  gzip_vary       on;
  gzip_types      text/plain text/css application/x-javascript application/json text/xml application/xml application/xml+rss text/javascript;

  include /usr/local/nginx/conf/sites-enabled/*;
   server {
      listen 8080;
      server_name my_host_name;
      root /home/user/documentcloud/public;   # <--- be sure to point to 'public'!
      passenger_enabled on;
      passenger_base_uri /document_cloud;
   }
}

---结束配置

4

0 回答 0