ddollar / foreman

Manage Procfile-based applications

Home Page:http://ddollar.github.com/foreman

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Foreman exporting Upstart script for production mode

dcalixto opened this issue · comments

i'm trying to make a Upstart script exported with foreman and rbenv work but the script aways shows this error:

/bin/sh: 1: exec: bundle: not found
this is the gerenated .conf file
start on starting app-work
stop on stopping app-work
respawn

env PORT=5600

setuid ubuntu

chdir /home/ubuntu/app/current
env RAILS_ENV=production

env PATH=‘/home/ubuntu/.rbenv/ruby/versions/2.2.2/bin’

exec bundle exec rake resque:work QUEUE=mailer

on foreman wiki they said that you have to create a .env on the root of app with:

PATH=/home/user/.rvm/gems/ruby-2.1.1/bin:/home/user/.rvm/rubies/ruby-2.1.1/bin:/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/user/.rvm/bin
RAILS_ENV=production
but this is a rvm and on rbenv?

someone please can help me. thank's

The wiki says (emphasis mine):

For a Ruby on Rails application, here is a common starting point that includes rvm.

The sample .env file is a sample. If you were using RVM, you might add a path like the one below.

PATH=/home/user/.rvm/gems/ruby-2.1.1/bin:/home/user/.rvm/rubies/ruby-2.1.1/bin:/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/user/.rvm/bin
RAILS_ENV=production

Since you're using rbenv, your will probably want to set a different PATH in your .env.

Since this is not an issue with the gem, would you consider closing this issue?