Thanks.  OK, so if I do rbenv local in my app directory will unicorn use 
that version to run unicorn when I do ' service unicorn_eventpuddle start '?

I was using ' ruby server' from bash on my dev box and had the following in 
my .bashrc so I used rbenv.

export RBENV_ROOT=/usr/local/rbenv
export PATH="$RBENV_ROOT/bin:$PATH"
eval "$(rbenv init -)"

So do I need to put this in the /etc/init.d/unicorn_appname script as it is 
run as root (I think).


Also wondering exactly how .ruby-version works.  I know 'rbenv local 3.2.1' 
creates it but when I do ruby stuff does it just look in the current 
directory for the file or does it traverse up the directory tree until it 
fins one? 

On Tuesday, September 12, 2017 at 8:48:52 PM UTC+1, Walter Lee Davis wrote:
>
> If you are in the directory containing the application, you can use the 
> rbenv local command to get and set the ruby version to use within the app. 
>
> rbenv local 3.2.1 
>
> will set the ruby version. It does this by creating or modifying a 
> .ruby-version file in the application root. 
>
> Walter 
>
> > On Sep 12, 2017, at 3:25 PM, Ben Edwards <[email protected] 
> <javascript:>> wrote: 
> > 
> > Hi, ive managed to get unicorn/nginx working (using 
> https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-unicorn-and-nginx-on-ubuntu-14-04)
>  
> and i am using rbenv.  The setup used a .rbenv-vars configuration file in 
> the ruby app directory.   what I cant figure out is how to specify what 
> version of ruby to tell it to use.  Ime ding this on my dev box, where I 
> only have one version but when I put it on prod they have several so I need 
> to specify which to use. 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Ruby on Rails: Talk" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to [email protected] <javascript:>. 
> > To post to this group, send email to [email protected] 
> <javascript:>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/15d10ba9-f588-43ee-8184-cc27aa39f3f1%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/dd3b868e-54bd-4389-ab58-974e8dfe8bcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to