On production server Passenger(4.0.0.rc6 + nginx) keeps requiring the :development
group in Gemfile
. After manually commenting them out from Gemfile
the app runs fine. Otherwise, Passenger would fail on starting the app because of the missing gems.
I checked the error page, it seemed Passenger was running in production mode:
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV and PASSENGER_ENV)
production
Below are sources of my simple app, am I missing any setting to have Passenger work? Thanks.
Here is my app.rb
, a simple sinatra app.
require 'rubygems'
require 'sinatra'
get "/" do
"Hello!"
end
I deploy it by vlad to production server. Here is the config/deploy.rb
require 'bundler/vlad'
set :application, "sinatratest"
set :domain, "server domain"
set :deploy_to, "path/on/server"
set :repository, "mygithub branch"
And my config.ru
require 'rubygems'
require 'sinatra'
require './app'
run Sinatra::Application
And Gemfile
source 'https://rubygems.org'
gem 'sinatra'
group :development do
gem 'vlad', require: false
gem 'vlad-git', require: false
end