Ruby on rails 无法启动Phusion乘客应用程序

Ruby on rails 无法启动Phusion乘客应用程序,ruby-on-rails,ruby,raspberry-pi,apache2,Ruby On Rails,Ruby,Raspberry Pi,Apache2,我有一些问题,一直在互联网上搜索类似的问题,但我仍然卡住了。问题在于apache2+phusion乘客。我在主持一个树莓派的节目。我已经安装了apache2和虚拟主机文件。但当我测试应用程序时,我得到的应用程序不能从Phusion passenger启动 连接到外部PC上的本地主机时,Phusion Passenger出错。日志文件: [Mon Jan 11 22:37:07 2016] [notice] Apache/2.2.22 (Debian) Phusion_Passenger/3.0.

我有一些问题,一直在互联网上搜索类似的问题,但我仍然卡住了。问题在于apache2+phusion乘客。我在主持一个树莓派的节目。我已经安装了apache2和虚拟主机文件。但当我测试应用程序时,我得到的应用程序不能从Phusion passenger启动

连接到外部PC上的本地主机时,Phusion Passenger出错。日志文件:

[Mon Jan 11 22:37:07 2016] [notice] Apache/2.2.22 (Debian) Phusion_Passenger/3.0.13 PHP/5.4.45-0+deb7u2 configured -- resuming normal operations
[ pid=14842 thr=11296008 file=utils.rb:176 time=2016-01-11 22:37:10.346 ]: *** Exception LoadError in PhusionPassenger::Rack::ApplicationSpawner (cannot load such file -- bundler) (process 14842, thread #<Thread:0x158ba10>):
    from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:325:in `prepare_app_process'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/application_spawner.rb:156:in `block in initialize_server'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:572:in `report_app_init_status'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/application_spawner.rb:154:in `initialize_server'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:204:in `start_synchronously'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:180:in `start'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/application_spawner.rb:129:in `start'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:253:in `block (2 levels) in spawn_rack_application'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:246:in `block in spawn_rack_application'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
    from <internal:prelude>:10:in `synchronize'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    from /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    from /usr/share/phusion-passenger/helper-scripts/passenger-spawn-server:99:in `<main>'
rails-v

Rails 4.1.8
在my/www中保存文件

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer',  platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]

尝试将文件夹的权限更改为777

sudo chmod -r 777 folder_path.

然后再次运行bundle重新启动apache2服务器

尝试将文件夹权限更改为777

sudo chmod -r 777 folder_path.

然后再次运行bundle重新启动apache2服务器

确保Apache用户有权访问Phusion passenger。我假设您使用的是Rasbpian,Debian发行版。在本例中,Apache用户可能是www数据。如果您使用的是CentOS、RedHat或Fedora,则默认Apache用户名为Apache。但是,这只是默认设置。某些软件(如cPanel)可能会更改默认的apache用户。对于cPanel,默认的apache用户称为nobody。尝试使用以下命令强制apache访问

sudo chown -R www-data:www-data /phusion/passenger/installation/path

确保Apache用户有权访问Phusion passenger。我假设您使用的是Rasbpian,Debian发行版。在本例中,Apache用户可能是www数据。如果您使用的是CentOS、RedHat或Fedora,则默认Apache用户名为Apache。但是,这只是默认设置。某些软件(如cPanel)可能会更改默认的apache用户。对于cPanel,默认的apache用户称为nobody。尝试使用以下命令强制apache访问

sudo chown -R www-data:www-data /phusion/passenger/installation/path