- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
此服务器在 Ubuntu 10.04 上运行,尤其是在 Linode VPS 上。
乘客错误:
A source file that the application requires, is missing.
It is possible that you didn't upload your application files correctly. Please check whether all your application files are uploaded.
A required library may not installed. Please install all libraries that this application requires.
Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.
Error message:
no such file to load -- bundler
Exception class:
LoadError
Application root:
/srv/rails_app/current
我确实安装了 bundler ,我知道这是因为我做了“捆绑”。
这是我的 apache 配置:/etc/apache2/sites-enabled/000-default.conf:
<VirtualHost *:80>
PassengerRoot /usr/local/rvm/gems/ruby-1.9.2-p0/gems/passenger-2.2.15
PassengerRuby /usr/local/rvm/rubies/ruby-1.9.2-p0/bin/ruby
ServerName 173.230.152.41
DocumentRoot /srv/rails_app/current/public
<Directory "/srv/rails_app/current/public">
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
/etc/apache2/apache2.conf:
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "/var/log/apache2/foo.log"
# with ServerRoot set to "" will be interpreted by the
# server as "//var/log/apache2/foo.log".
#
### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at <URL:http://httpd.apache.org/docs-2.1/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/etc/apache2"
#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
#<IfModule !mpm_winnt.c>
#<IfModule !mpm_netware.c>
LockFile /var/lock/apache2/accept.lock
#</IfModule>
#</IfModule>
#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15
##
## Server-Pool Size Regulation (MPM specific)
##
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
# event MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_event_module>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy all
</Files>
#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain
#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog /var/log/apache2/error.log
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn
# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
# Include all the user configurations:
Include /etc/apache2/httpd.conf
# Include ports listing
Include /etc/apache2/ports.conf
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
#
# Define an access log for VirtualHosts that don't define their own logfile
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined
# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.
# Include generic snippets of statements
Include /etc/apache2/conf.d/
# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.2-p0/gems/passenger-2.2.15/ext/apache2/mod_passenger.so
那么我该如何着手让它发挥作用呢?
最佳答案
您需要关注RVM's instructions用于生成乘客包装脚本以在您的 PassengerRuby 线路上使用。没有它,您将无法设置正确的环境变量,Apache 将无法找到安装在该 RVM 安装中的 gem。
关于ruby-on-rails - 我的 Rails 3 站点无法在 Ubuntu/Apache2/Passenger 上启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3673878/
我使用以下命令安装了 Phusion Passenger sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CA
我已经调试了一天多了,没有运气, 安装 ruby、gems 和 Passenger 后,我尝试启动 Passenger,但我一直收到“找不到乘客”: passenger@dragon:/usr/w
基本上,我的路线运行完美,乘客似乎正在加载 - 一切都很好。除了没有 Railsy 发生。这是我从启动服务器到第一个请求的 Nginx 日志(忽略不同的域/路由 - 这是因为我还没有移动新域,并且它返
如果我通过以下方式安装 passenger 包: $ sudo apt-get install libapache2-mod-passenger 我还需要运行吗: $ passenger-inst
我在安装了 Passenger 和 Nginx(带有 Passenger 模块)的生产服务器上安装了一个 Rails 应用程序。但是,当我运行 rvmsudo passenger-status 时,它
这是一个在 Phusion Passenger 上运行的 Rails 应用。 在开发环境(乘客独立模式)中,我在基于 Vagrant Ubuntu 14.04 的机器上运行它,在 MBP(工作)和 L
http://nodejs-resume.developmentserver.me/ 当网站加载时, /usr/local/dh/passenger/helper-scripts/node-loade
如果我在 enterprise passenger 中配置滚动重启,然后触摸 restart.txt,我如何以编程方式检查该过程是否已完成并可以保证不再提供旧版本? 最佳答案 我知道自问这个问题以来已
我有一个 sinatra 应用程序,其页面显示有关该应用程序的一些信息。其中一些是通过在页面加载时运行命令生成的。在 unicorn 中运行时,我的 MacBook 上一切正常,在 unicorn 中
我很难弄清楚如何使用 rbenv连同 passenger .我在运行 debian 6 ,所以我安装了 passenger来自 oss-binaries.phusionpassenger.com存储库
Phusion Passenger 的 Apache 模块安装在哪里?我想调整“Configuring Phusion Passenger”中的一些配置值。 我不知道这个配置文件在哪里。我已经按照 N
TL; DR =无法让Passenger / Nginx从Django调用我们的应用程序。 “passenger-status”未显示当前运行的非Docker服务器中显示的正确应用程序组。 尝试将运行
我试图了解 Passenger Nginx 如何处理并发请求。我重新加载了一个页面并查看了生产日志。每次页面都会向服务器同时发送多个 ajax 请求。有一些任务需要昂贵的数据库查询,称为“status
我在我的 Linode 服务器上使用 Apache + Passenger,使用 Postgresql-9.4 数据库。每隔一段时间,我就会收到以下错误,但它是不可预测的,并且在几分钟后没有采取任何措
来了:我有一个在 RedHat 服务器上运行的 Rails 应用程序。我使用 Passenger Standalone v3.0.19 来提供服务。数据库是MySQL。最近我发现一些Passenger
我正在使用 nginx 和 Phusion Passenger 来引导加载 ruby on rails 应用程序,如果我像这样运行应用程序 rails s -e production 它确实正确连
我想使用 apache 和 passenger 将我的应用程序部署到我的本地服务器中。我安装了所有先决条件,如开发库和 passenger gem。然后我将这些行包含到我的/etc/apache2/h
我有一个使用 Phusion passenger + Apache 网络服务器部署的 Ruby on Rails 应用程序。每个请求是否都在由 Phusion Passenger 生成的自己的线程中运
我遇到了一个问题,无论我尝试什么,所有乘客实例都会在空闲期(5 分钟,但有时更长)后被销毁。我已阅读 Stack Overflow 上的乘客文档和相关问题/答案。 我的全局配置如下所示: Passen
我正在尝试通过运行以下命令来自动化 nginx/passenger 安装程序: passenger-install-nginx-module --auto --auto-download --extr
我是一名优秀的程序员,十分优秀!