skip to Main Content

I’m trying to run foreman start on my app.

but it gives me an error saying

12:53:39 web.1     | started with pid 7647
12:53:39 rails.1   | started with pid 7648
12:53:39 webpack.1 | started with pid 7649
12:53:39 web.1     |  [passenger_native_support.bundle] trying to compile for the current user (hiro_yamada) and Ruby interpreter...
12:53:39 web.1     |      (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
12:53:40 webpack.1 | /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/bundler/gems/webpacker-78b2dd910603/lib/webpacker/dev_server_runner.rb:47:in `exec': No such file or directory - /Users/hiro_yamada/Dropbox/foriio/node_modules/.bin/webpack-dev-server (Errno::ENOENT)
12:53:40 webpack.1 |    from /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/bundler/gems/webpacker-78b2dd910603/lib/webpacker/dev_server_runner.rb:47:in `block in execute_cmd'
12:53:40 webpack.1 |    from /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/bundler/gems/webpacker-78b2dd910603/lib/webpacker/dev_server_runner.rb:46:in `chdir'
12:53:40 webpack.1 |    from /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/bundler/gems/webpacker-78b2dd910603/lib/webpacker/dev_server_runner.rb:46:in `execute_cmd'
12:53:40 webpack.1 |    from /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/bundler/gems/webpacker-78b2dd910603/lib/webpacker/dev_server_runner.rb:11:in `run'
12:53:40 webpack.1 |    from /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/bundler/gems/webpacker-78b2dd910603/lib/webpacker/runner.rb:6:in `run'
12:53:40 webpack.1 |    from /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/bundler/gems/webpacker-78b2dd910603/exe/webpack-dev-server:8:in `<top (required)>'
12:53:40 webpack.1 |    from bin/webpack-dev-server:17:in `load'
12:53:40 webpack.1 |    from bin/webpack-dev-server:17:in `<main>'
12:53:40 webpack.1 | exited with code 1
12:53:40 system    | sending SIGTERM to all processes
12:53:40 web.1     | bundler: failed to load command: passenger (/Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/bin/passenger)
12:53:40 web.1     | SignalException: SIGTERM
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:310:in `system'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:310:in `sh_nonfatal'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:337:in `block (3 levels) in compile'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:335:in `chdir'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:335:in `block (2 levels) in compile'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/utils/tmpio.rb:70:in `mktmpdir'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:334:in `block in compile'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:378:in `block (2 levels) in try_directories'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:377:in `chdir'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:377:in `block in try_directories'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:371:in `each'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:371:in `each_with_index'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:371:in `try_directories'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:329:in `compile'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:219:in `compile_and_load'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:52:in `start'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/native_support.rb:439:in `<top (required)>'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger.rb:240:in `require'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger.rb:240:in `require_passenger_lib'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/utils/file_system_watcher.rb:25:in `<top (required)>'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger.rb:240:in `require'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger.rb:240:in `require_passenger_lib'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/standalone/app_finder.rb:27:in `<top (required)>'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger.rb:240:in `require'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger.rb:240:in `require_passenger_lib'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb:288:in `find_apps'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb:59:in `run'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/src/ruby_supportlib/phusion_passenger/standalone/main.rb:51:in `run!'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/gems/passenger-5.1.8/bin/passenger:45:in `<top (required)>'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/bin/passenger:23:in `load'
12:53:40 web.1     |   /Users/hiro_yamada/Dropbox/foriio/vendor/bundle/ruby/2.2.0/bin/passenger:23:in `<top (required)>'
12:53:40 rails.1   | terminated by SIGTERM
12:53:40 web.1     | exited with code 1

How could I fix this issue…?
Thank you for you time.


So I tried adding passenger on gemfile and bundling… Still not working.
and I noticed one thing, when I changed my ruby version to 2.2.0 sinc passenger was under a directory ruby/2.2.0/. Then error was returned saying foreman only can run on 2.2.3. Maybe passenger gem I installed is not compatible with ruby 2.2.3??

My procfile and gemfile is

web: bundle exec passenger start -p $PORT --max-pool-size 6
rails: PORT=3000 rails s
webpack: bin/webpack-dev-server

source 'https://rubygems.org'
ruby "2.2.3"

gem 'rails', '~> 5.1.1'
gem 'uglifier', '>= 1.3.0'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0',          group: :doc
gem 'spring',        group: :development
gem 'passenger'
gem 'paperclip', '4.3.6'
gem 'rmagick'
gem 'aws-sdk', '< 2.0'
gem 'newrelic_rpm'
gem 'friendly_id', '~> 5.1.0'
gem 'ruby-oembed'
gem 'impressionist'
gem 'meta-tags'
gem 'capybara'
gem 'poltergeist'
gem 'webpacker', github: 'rails/webpacker'

# Client
gem 'slim-rails'
gem 'sass-rails'
gem 'coffee-rails'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'turbolinks'
gem 'aasm'
gem 'siteinfo_parser'
gem 'open_uri_redirections'

# Exception Notification to Slack
gem 'exception_notification', :github => 'smartinez87/exception_notification'
gem 'slack-notifier'

# login
gem 'devise'

# Oauth
gem 'omniauth'
gem 'omniauth-facebook'
gem 'omniauth-twitter'
gem 'omniauth-instagram'

# Auth
gem 'cancancan', '~> 1.10'

# SNS API
gem 'koala'
gem 'twitter'
gem 'instagram'

# manage constant file
gem 'config'

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

# Pagination
gem 'kaminari'

# Auto-link
gem 'rails_autolink'

#font-awesome
gem 'font-awesome-sass'

# follow, like, mention
gem 'socialization'

# Copy to clipboard
gem 'zeroclipboard-rails'

group :development, :test do
  gem 'better_errors'
  gem 'binding_of_caller'
  gem 'foreman'
  gem 'pry-rails'
  gem 'pry-byebug'
  gem 'pry-doc'
  gem 'pry-stack_explorer'
end

group :development do
  gem 'pg'
end

group :test do
  gem 'sqlite3'
end

group :production do
  gem 'pg'
  gem 'rails_12factor'
end

2

Answers


  1. You have problem with Passenger. Try to run only it in development mode and after that in production. You should see error on log output.

    It is a most common approach for debugging foreman.

    Login or Signup to reply.
  2. Try to add gem 'passenger' to your Gemfile and run bundle. The issue might be that you installed passenger via gem install passenger and bundler doesn’t load it.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search